Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Short answer: Android 14 and later provide a documented screenshot-detection callback for a visible activity. A web page does not have an equivalent, general event for operating-system screenshots. Browser APIs can tell you that a document became hidden or let a user start an explicitly consented screen-sharing stream, but neither proves that a screenshot was taken.

Use Android’s callback when you control a native app and need to react to the supported device screenshot action. For a website, design around the fact that screenshot detection is not reliably available; use access controls, watermarking, or server-side protections instead of pretending that a browser event is a detector.

What “screenshot detection API” can mean

The answer depends on where the content is displayed. A native Android application, a browser page, and an API that creates screenshots are three different cases.

Platform or tool What it can observe What it cannot establish Image pixels supplied?
Android 14 screenshot detection A supported screenshot action while a registered activity is visible Every possible capture method, including the documented ADB and instrumentation-test paths No
Page Visibility API Whether a document becomes visible or hidden That a screenshot was taken No
Screen Capture API (getDisplayMedia()) A user-approved display, window, or tab sharing/recording stream Unrelated screenshot shortcuts or captures made outside that sharing session Yes, as a live media stream selected by the user
Screenshot-generation service A screenshot rendered by the service itself Screenshots taken by somebody viewing your page Usually yes, as the generated file

Keeping these categories separate prevents a common implementation error: wiring a visibility or screen-sharing event into code that claims to detect a user pressing a device screenshot shortcut.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Magicmoon 2-Pack 24 Inch Computer Privacy Screen Filter for 16:9 Monitor
  • Compatible Model(s): Magicmoon brand filter only for 24 inch -diagonally measured - widescreen monitor - aspect ratio 16:9 - filter size: width: 20 15/16", Height: 11 13/16" (531mm x 298mm)
  • Superior Privacy: The computer privacy filter makes the screen appear dark when looking at it from an angle (the angle is about 30 to 60 degree), but bright when looking directly at it. To change the privacy level - simply adjust your monitor’s brightness accordingly
  • Eye and Screen Protection: Privacy Filter does not only protect your private life but also protects your eyes by blocking 30% of blue light , blocking the harmful blue light between 380 to 495 nm, it filters out the blue light and relieves eye strain
  • Perfect For Open Workspaces: Great for maintaining screen privacy in open work spaces
  • Includes Two Options: Option 1 uses clear adhesive strips that securely attach to any computer screen. Option 2 (for computer screens with a raised bezel only) uses slide mount tabs that easily stick to the display frame, allowing you to slide the privacy screen filter on and off as needed

Android’s native detector (Android 14+)

Android’s documented API registers an Activity.ScreenCaptureCallback for an individual activity. When Android detects the supported screenshot action while that activity is visible, it invokes your callback. Your application decides what to do next, such as showing an in-app explanation, recording an internal event, or warning another user. The callback does not include the screenshot image; Android’s documentation explicitly states that it does not provide an image of the actual screenshot.

Scope and limitations

  • The API was introduced in Android 14 (API level 34).
  • You must declare the install-time android.permission.DETECT_SCREEN_CAPTURE permission.
  • Registration is per activity. Register it for each relevant activity rather than assuming a global listener covers the whole application.
  • The documented detector covers a specific hardware-button screenshot combination. It does not detect screenshot test commands made through ADB or captures performed inside instrumentation tests.
  • A callback is notification, not prevention. It does not stop a person from photographing the screen, using another capture path, or recording content that your app displays.

Manifest declaration

<manifest xmlns:android="http://schemas.android.com/apk/res/android">
    <uses-permission android:name="android.permission.DETECT_SCREEN_CAPTURE" />
    <application
        android:theme="@style/Theme.YourApp"
        android:label="@string/app_name">
        <activity
            android:name=".MainActivity"
            android:exported="true">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
</manifest>

The permission is declared at install time. It is not a runtime permission that you request with a dialog in the same way as camera or location access.

Kotlin activity implementation

This example registers on onStart(), unregisters on onStop(), and keeps the callback lightweight. Replace the UI action and logging with your own policy.

package com.example.screenshotdemo

import android.app.Activity
import android.os.Build
import android.os.Bundle
import android.widget.Toast
import androidx.activity.ComponentActivity

class MainActivity : ComponentActivity() {

    private val screenCaptureCallback =
        object : Activity.ScreenCaptureCallback {
            override fun onScreenCaptured() {
                // Do not assume an image is available here.
                runOnUiThread {
                    Toast.makeText(
                        this@MainActivity,
                        "A screenshot was detected",
                        Toast.LENGTH_SHORT
                    ).show()
                }
            }
        }

    override fun onStart() {
        super.onStart()
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
            registerScreenCaptureCallback(
                mainExecutor,
                screenCaptureCallback
            )
        }
    }

    override fun onStop() {
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
            unregisterScreenCaptureCallback(screenCaptureCallback)
        }
        super.onStop()
    }
}

Compile with an Android SDK that contains API level 34 symbols, while retaining the version check so the same APK can run on older releases. If your minimum SDK is lower than 34, the guarded calls prevent execution on devices that do not implement the API.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
15.6 Inch Privacy Screen Filter for 16:9 Monitor 1920 x 1080 Resolution
  • Compatible Models: Width: 13 9/16" (13.5 inch/344 mm), Height: 7 5/8" (7.6 inch/194 mm), Diagonal: 15.6" (396.24 mm) widescreen laptops which have a 16:9 aspect ratio. Not touchscreen compatible !!! Not fit for 16:10.Do NOT rely solely on your laptop’s diagonal size when ordering. Use a ruler to measure your screen’s visible area (excluding the black bezels). If the width reads 344mm and height reads 194mm, this filter is a perfect match for your device.
  • Keep Information Privacy: Effective "black out" privacy from side views outside the 60-degree viewing angle. Designed for optical clarity when viewing from the front, a person not at the front of the screen can only see the dark side of the screen, so it protects buisness secrets and personal privacy
  • Eye and Screen Protection: Privacy filter does not only protect your private life but also protects your eyes by blocking 30% of blue light , blocking the harmful blue light between 380 - 495nm, it filters out the blue light and relieves eye strain. Our laptop privacy screen also helps keep your screen safe from dust and scratches
  • Perfect For Open Workspaces: Great for maintaining screen privacy in high traffic areas such as open work spaces, airports, airplanes, commuter trains, coffee shops and other public places, etc
  • Easy Installation: Choose between 2 simple Options; Slide-On/Off or Mounted. Not touchscreen compatible

Choosing a safe response

  • Notify: Tell the user that the action was detected, if that is appropriate for your product and privacy notice.
  • Record: Store an event without storing sensitive page content. Make retention and access rules explicit.
  • Change state: For example, mark a one-time view as consumed. Do this only when the product requirement justifies it; a callback does not prove that the image was shared.
  • Protect future content: Add a watermark or reduce sensitive information in later screens. Do not claim that the callback prevented the current capture.

Because no pixels are returned, the app must already know which screen or data the activity was showing if it needs contextual handling.

Can a website detect screenshots?

For ordinary web pages, no standard browser API reliably reports that a user used an operating-system screenshot shortcut. The browser may not receive any event at all, and the capture can occur outside the browser’s security boundary. An external camera, remote-desktop tool, browser extension, or operating-system utility can also copy what is visible without creating a web-observable signal.

Why Page Visibility is not a detector

The Page Visibility API exposes document.visibilityState and the visibilitychange event. A document can become hidden when the user changes tabs, minimizes a window, switches applications, or locks a device. A screenshot may happen while the page remains visible, so the event cannot be interpreted as proof of capture.

document.addEventListener('visibilitychange', () => {
  if (document.visibilityState === 'hidden') {
    pauseVideoOrReduceBackgroundWork();
  } else {
    resumeWorkIfAppropriate();
  }
});

Use this API for pausing media and reducing background work—not for security decisions, audit records, or screenshot alerts.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
[2 Pack] 24 Inch Computer Privacy Screen Filter for 16:9 Widescreen Monitor
  • 【24 PRIVACY FILTER DIMENSIONS】 Width: 20 15/16" (20.9 inches/532 mm), Height: 11 13/16" (11.8 inches/299 mm) - 16:9 Aspect Ratio. Mamol computer privacy filters are designed to be perfectly compatible with HP, Samsung, Dell, Lenovo, Acer, Asus, LG, ViewSonic and other brands of monitors. Please check the width and height dimensions of your computer screen before ordering. If you have any questions about the dimensions, please contact us.
  • 【ENHANCED PRIVACY PROTECTION】Mamol 24 inch computer privacy filter keeps your electronic information confidential, making it excellent for use in high traffic areas. the computer privacy screen 24 inch is designed with advanced microlouver technology to block visibility at around 30 degrees and black out screens completely near 60 degrees.
  • 【EYES PROTECTION】 This blackout privacy screen greatly reduces eye strain and minimizes potential hazards to vision. It filters 99.9% of UV rays and suppresses 98% of blue light. As a reversible 24-inch privacy screen filter: The glossy side of the protector provides extra clarity and greater privacy, and the matte side minimizes glare and distracting reflections. Satisfy your different daily uses as needed.
  • 【BETTER HD CLARTIY】Mamol 24 inch computer privacy screen Shield adds an extra layer of AR Ultra HD light transmission compared to others. It maintains the high definition of the screen without sacrificing too much screen brightness. It won't reduce the brightness and cause eye fatigue because of the privacy screen installed on the screen.
  • 【ANTI SCRATCH & WASHABLE 】Our privacy anti-glare Monitor film has a surface enhancement layer to protect the privacy filter from scratches and fingerprints. It is washable and reusable. Even after prolonged use, you will get a brand new privacy screen for your desktop computer monitor after cleaning. Very Durable!

What getDisplayMedia() actually does

The Screen Capture API asks the user to choose a display surface, window, or browser tab and then returns a live MediaStream. It is designed for intentional sharing or recording. The browser’s permission and picker controls are part of its security model; they do not notify your page whenever the user independently takes a screenshot.

async function shareForAUserApprovedSession() {
  try {
    const stream = await navigator.mediaDevices.getDisplayMedia({
      video: true,
      audio: false
    });

    const video = document.querySelector('#preview');
    video.srcObject = stream;
    await video.play();

    stream.getVideoTracks()[0].addEventListener('ended', () => {
      video.srcObject = null;
      console.log('The user stopped sharing');
    });
  } catch (error) {
    // NotAllowedError commonly means the user cancelled or denied the picker.
    console.error('Screen sharing was not started', error);
  }
}

Call this only from a user action, such as a button click, and explain why sharing is needed. Treat the returned stream as a deliberate session, not as evidence that a separate screenshot was taken.

Detection, prevention, and evidence are different goals

Detection

Detection means receiving a signal after a narrowly defined event. Android’s callback fits this definition for its documented screenshot action. The signal is limited and contains no image.

Prevention

Prevention means making capture impossible or less useful. Neither the Android callback nor a browser visibility event provides comprehensive prevention. You can apply product controls such as redaction, watermarks, short-lived content, or policy enforcement, but describe those as mitigations rather than guarantees.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
SightPro Magnetic Laptop Privacy Screen 14 Inch 16:9 - Patented Removable Laptop Privacy Filter Shield and Protector
  • 【Instant Snap-on Magnetic Attachment】- The Patented Magnetic Privacy Screen – Protected by U.S. Patents 9,829,669 and D844,012. Simply place the privacy screen along the top of your MacBook and let the magnets attach along the top. No need for tricky placement, messy tape, or damaging adhesive. Easily remove and reattach when you need it.
  • 【Filter Dimensions】: Width: 12 3/16" (310 mm), Height: 6 7/8" (175 mm), Diagonal: 14" (355.6 mm) - There are two different 14 inch screen sizes, please select the correct one. SightPro Blackout Privacy Filter is engineered to be compatible with Lenovo, HP, Dell, Acer, Asus, Samsung, and other laptop brands. Please verify your screen's width and height measurements before ordering. It's not recommended to make your selection based solely on your screen's diagonal size. [Not optimized for touchscreens.]
  • 【Superior Privacy】- Our advanced multi-layered film filter blacks out your screen when viewing from the side, while maintaining a crystal clear screen straight-on. It also protects your eyes from harmful UV and blue light. [Note: It does not block visibility directly behind you, regardless of the distance.]
  • 【Perfect for Travel and Open Workspaces】- The Laptop Privacy Screen Filter is the ideal solution for healthcare providers, mobile workers, commuters, students, and business travelers. Now you can stay compliant and safeguard sensitive corporate information while working in airplanes, subways, airports, and public areas.
  • 【Package Contents】- Each package includes a magnetic privacy screen filter, magnetic stickers, a webcam privacy cover, a storage folder, and a cleaning cloth. Buy with confidence – located in the US, Sight Pro specializes in providing best-in-class privacy solutions to individuals, small businesses, corporations, government, and educational institutions. Our privacy screens are Section 889 and TAA compliant.

Evidence and audit

An audit trail should state exactly what was observed: for Android, the callback firing for a registered visible activity. Do not label a visibility change, a failed screen-share request, or a server request as proof that a screenshot exists.

Testing an Android implementation

  1. Install the app on a physical or emulator image running Android 14 or newer.
  2. Open the activity that registered the callback and leave it visible.
  3. Use the device’s supported hardware-button screenshot action.
  4. Confirm that your callback runs once and that your UI or event handling remains responsive.
  5. Navigate away and back to exercise onStop() and onStart(). Verify that callbacks are not duplicated after repeated lifecycle transitions.
  6. Test older Android versions to confirm that the guarded registration code does nothing and the app still works.
  7. Test your ADB and instrumentation screenshot commands separately, and document that they are outside the detector’s documented scope rather than treating a missing callback as a bug.

A callback test should not depend on receiving an image. If your design needs image analysis, capture or generate the relevant content through a separate, explicitly authorized workflow.

Common failures and fixes

Symptom Likely cause Fix
The project does not compile because the callback type or permission is unknown. The compile SDK is older than API 34. Compile against an SDK containing Android 14 APIs, keep the runtime version check, and install the manifest permission.
A screenshot made with a test command does not trigger the callback. ADB and instrumentation-test captures are outside the documented detection scope. Use the supported device screenshot action for functional testing; treat test-command coverage as a separate requirement.
The callback fires but code cannot read a screenshot file. The callback supplies no image payload. Use the activity’s known state for your response, or build a separate authorized capture pipeline.
Multiple notifications appear after revisiting a screen. The activity registered more than once or failed to unregister. Pair registration and unregistration in lifecycle methods and keep one callback instance per activity.
A web page logs “hidden” and reports a screenshot. Page Visibility was mistaken for screenshot detection. Use the event only for visibility-related behavior; remove screenshot claims.
getDisplayMedia() rejects immediately. The user denied or cancelled the picker, the call was not initiated by a permitted user gesture, or the browser/security context disallows it. Explain the request, invoke it from a user action, handle NotAllowedError, and provide a non-sharing fallback.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

If you need to create screenshots instead of detect them

A screenshot-generation API solves a different problem: rendering a URL on demand for previews, QA, visual regression, or documents. Cloudflare’s documented screenshot endpoint is an example of this category; it creates a screenshot and does not detect one taken by a visitor.

ScreenshotNeo is the first alternative to try when you need generated website screenshots because it removes consent banners, newsletter popups, and chat widgets before capture, bills only clean shots, and has a $5 paid plan for 3,000 shots.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Or skip the browser setup

ScreenshotNeo is not a detector for screenshots taken by users. It is a website screenshot API and MCP server: one request renders a URL and returns PNG, JPEG, WebP, or PDF. Before capture it can accept cookie/consent banners and remove more than 60 known consent platforms, newsletter popups, and chat widgets; each cleanup step can be disabled. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers identify the page verdict and billing result.

Use the ScreenshotNeo API documentation for authentication and options. This cURL request is runnable as written after replacing the key:

Best Value
SightPro 24 Inch 16:9 Computer Privacy Screen Filter for Monitor - Privacy Shield and Anti-Glare Protector
  • 【Privacy Filter Dimensions】- Width: 20 15/16" (532 mm), Height: 11 13/16" (299 mm), Diagonal: 24" (609.6 mm) - SightPro Blackout Privacy Screen Filter is engineered to be compatible with HP, Dell, Samsung, Lenovo, LG, Acer, ASUS, ViewSonic, and other monitor brands. Please verify your computer screen's width and height measurements before ordering. It's not recommended to make your selection based solely on your computer screen's diagonal size.
  • 【Two Attachment Options】- Installs in minutes. Option 1 uses clear adhesive strips that securely attach to any computer screen. Option 2 (for computer screens with a raised bezel only) uses slide mount tabs that easily stick to the display frame, allowing you to slide the privacy screen filter on and off as needed.
  • 【Superior Privacy and Anti Glare】- Our advanced multi-layered film filter blacks out your computer screen when viewing from the side, while maintaining a crystal clear screen straight-on. It also protects your eyes from harmful glare, UV, and blue light. [Note: It does not block visibility directly behind you, regardless of the distance.]
  • 【Perfect for Travel and Open Workspaces】- Our computer screen privacy filter is the ideal solution for healthcare providers, mobile workers, commuters, students, and business travelers. Now you can stay compliant and safeguard sensitive corporate information while working in airplanes, subways, airports and public areas.
  • 【Package Contents】- Each package includes one privacy screen shield filter, two sets of clear adhesive strips, two sets of slide mount tabs, and a microfiber cleaning cloth. Buy with confidence – located in the US, Sight Pro specializes in providing best-in-class privacy solutions to individuals, small businesses, corporations, government, and educational institutions. Our privacy screens are Section 889 and TAA compliant.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

Python:

import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)

Node.js:

const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

The service also supports full-page captures with lazy images loaded, CSS-selector element shots, dark mode, device presets and custom viewports, retina scale, PDF paper and page-range controls, custom CSS and JavaScript, clicks, waits, request blocking, headers, cookies, user agents, authorization, timezone and geolocation, transparent backgrounds, resizing, configurable caching, signed image links, asynchronous jobs with signed webhooks, bulk capture of up to 100 URLs per call, a usage API, and an OpenAPI specification. Its MCP server exposes take_screenshot, get_page_info, and capture_pdf for Claude, Cursor, and other MCP clients.

The Free plan includes 1,000 screenshots per month with no card. Paid plans start at $5 for 3,000 shots; every feature is available on every plan, and yearly billing provides two months free. Create a free ScreenshotNeo account to generate screenshots without setting up a browser.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Practical decision guide

  • Native Android app, Android 14+: declare the detection permission, register a callback for each visible activity, and design a response that does not require image pixels.
  • Website asking whether a visitor pressed a screenshot shortcut: there is no general reliable browser detector. Do not substitute Page Visibility or getDisplayMedia().
  • Intentional screen sharing: use getDisplayMedia(), explain the consent prompt, and handle cancellation.
  • Automated screenshots of your own pages: use a screenshot-generation service such as ScreenshotNeo; generation and detection are separate workflows.

Frequently Asked Questions

Does Android send the screenshot image to my app?

No. The Android screenshot callback reports the supported event but provides no screenshot pixels. Your app must use the activity state it already knows.

Can I detect screenshots in an iPhone or desktop browser with this API?

The documented callback described here is an Android 14 activity API. The reviewed web APIs do not provide a general operating-system screenshot event.

Will hiding a page prove that the user took a screenshot?

No. A page can become hidden for many ordinary reasons, and a screenshot can be taken while it remains visible.

Is ScreenshotNeo a screenshot-detection service?

No. ScreenshotNeo generates clean screenshots of URLs and PDFs through an API and MCP server; it does not report screenshots taken by your visitors.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.