[Mobile Application]
Security Research Center
Screen recording callback
Technique summary | |
Technique | Screen recording callback |
Against | Screen recording attacks |
Limitations | Android ≥15 |
Permission DETECT_SCREEN_RECORDING is required |
|
Side effects | None |
Recommendations | Recommended for use for applications running on Android 15 and newer |
Android 15 provides a means to know when there is a change on the screen recording state. It is possible to register a callback to be called whenever there is a change. The callback receives the state, which can be compared with the values WindowManager.SCREEN_RECORDING_STATE_VISIBLE
and WindowManager.SCREEN_RECORDING_STATE_NOT_VISIBLE
. The callback can run on the main thread or in a background thread.
For example:
Guardsquare
Connect with the author
Table of contents