What an Android App Does When It Detects a Screen Recorder
The short answer
Most of the time, “detecting” a screen recorder isn’t detection at all. It’s prevention. The app never finds out you’re recording, because the operating system never lets the recording capture anything in the first place. That’s the part people miss when they ask how an app “knows.”
The one flag that actually matters
Android has a window property called FLAG_SECURE. A developer sets it on a specific window or view with a single line of code, and from that point on, the compositor that draws everything to the screen treats that content differently for any output that isn’t the physical display panel in front of you. Screenshots of that window come back black. Screen recordings show a black rectangle where the content should be. Casting the screen to a TV or a second display does the same thing.
This isn’t app logic reacting to a recording in progress. It’s a rendering instruction baked into how the frame gets composited, enforced below the app layer. The app doesn’t get a callback saying “recording detected,” and it doesn’t need one. It just tells the system “never let this leave the physical screen,” and the system honors that for every output that isn’t the display itself.
This is why banking apps go black when you try to screen record a balance, and why streaming apps show a black frame if you try to capture DRM protected video. It’s not the app watching for a recorder in real time. It’s a flag set once, at build time, on the views that hold sensitive content.
What Android’s own recording tool tells the user
The official way to record a screen on Android is the MediaProjection API. It’s what Play Store screen recorders use, and it’s also what remote support and casting tools rely on. Two things happen every time it’s used, and neither is optional for the developer building the recorder.
First, the user has to approve a system dialog before recording starts. There’s no silent, background way to trigger MediaProjection without that prompt. Second, while it’s active, Android shows a persistent indicator, either in the status bar or as a notification, telling the person using the phone that their screen is being captured. That signal is aimed at the human, not the app being recorded. The app whose content is on screen doesn’t get told anything by this mechanism.
So a lot of what looks like “the app detected my screen recorder” is really one of two things: the app set FLAG_SECURE and you just saw the result, or you saw Android’s own recording indicator and assumed the app produced it.
How apps try to detect recording without a direct signal
There’s no public API that hands an app a clean “the user is recording your screen” event. Apps that want real detection, beyond just blanking sensitive views, have to go looking for indirect evidence, and none of it is fully reliable:
- Checking installed packages for known screen recorder or capture tool package names.
- Watching for accessibility services or overlay permissions that recording and casting tools commonly request.
- Querying the display manager for virtual displays with capture related flags, since MediaProjection creates a virtual display to write frames into.
- Reading system settings that shift when a projection session starts.
Every one of these is a workaround, not a documented “am I being recorded” API, and each one behaves differently across Android versions. That instability is exactly why FLAG_SECURE stays the default choice for anything genuinely sensitive. It doesn’t rely on detecting a recorder at all, so there’s nothing to break.
What happens after an app decides it’s being recorded
When an app does take the indirect detection route rather than just relying on FLAG_SECURE, the response usually falls into one of four buckets, and which one it lands on depends on how much the developer cares about that specific screen.
Blank the sensitive view only. The rest of the app keeps working normally, but the one view holding a card number, a video frame, or a password field renders as a solid color. This is the least disruptive option, and it’s what FLAG_SECURE gives you automatically without any custom logic.
Show a warning and stop. A full screen message tells the user recording isn’t allowed here and to stop before continuing. This shows up in apps handling documents, contracts, or licensed content, where the developer wants an explicit acknowledgment rather than a silent block.
Log the event and keep going. The app doesn’t interrupt anything visible, but it notes that a capture tool or suspicious display condition was present, tagged to the account and device, for review later. This is common in apps built around fraud or abuse prevention, where an immediate block would tip someone off, but a flagged event still feeds into a review queue.
Restrict or log the account out. The most aggressive response, usually reserved for repeated or combined signals, where recording detection is one of several flags contributing to a decision that treats the session as untrusted.
None of this is exotic. It’s the same pattern you see in any system built around a permission boundary: block by default where you can, with FLAG_SECURE, and only fall back to detection and judgment calls where you can’t.
Why this matters if you’re running real devices, not just testing an app once
We run phones on real hardware here, physical Android devices racked in Singapore, not simulated environments. When you’re doing account management, QA, or documentation work across a fleet of real phones, you run into FLAG_SECURE constantly, and it’s worth knowing what you’re looking at before you assume something in your setup is broken.
If you go to screen record a banking app, a streaming app, or anything handling DRM content on a device you’re operating, and the recording comes back with a black box where that content should be, that’s not a dropped frame, a broken capture tool, or an issue with the phone. It’s the app doing exactly what its developer told it to do. No amount of adjusting your recording software fixes it, because the block happens below the app, at the point where the operating system composites the frame, before your recording tool ever sees it.
The practical takeaway is to separate two very different problems. If a specific sensitive screen renders black in your recording, that’s FLAG_SECURE working as intended, and the fix is to document around it rather than fight it, capture the surrounding context instead of the protected view, or just note in your QA record that the field behaves correctly but can’t be visually captured. If instead an account gets flagged, restricted, or logged out after you record activity on it, that’s a different mechanism entirely, more likely one of the indirect detection or behavioral flagging paths described above, and it’s worth checking whether your recording tool itself is triggering an accessibility or overlay permission that the target app is watching for.
Knowing which category you’re dealing with saves a lot of wasted time. One is a rendering rule you work around. The other is a trust signal you need to understand before you trip it again.
Where this leaves you
Screen recording detection on Android is mostly not detection at all. It’s a permission boundary set once, at the window level, that the operating system enforces on the app’s behalf. The cases where an app genuinely goes looking for a recorder are the exception, built on unreliable indirect signals, and reserved for apps with a strong reason to police that behavior actively rather than just blank the screen and move on.
If you’re managing real devices day to day, that distinction is worth internalizing early. It’ll save you from chasing a “bug” that’s actually a security feature working correctly, and it’ll help you tell the difference between an app protecting a single view and an app protecting an entire account.
See how we run cloud Android phones on real hardware
Get new guides and videos first — join the Telegram channel.