Screen Capture
Screenshot
Screenshot detection is a critical security feature that identifies when a screenshot is captured on the device. Screenshots can expose sensitive app data, such as confidential information displayed on the screen, user credentials, or personal content, leading to potential privacy and security risks. By detecting when a screenshot is taken, apps can implement countermeasures like obscuring sensitive content, notifying users, or logging the event for further analysis.
Below are code snippets demonstrating Screenshot detection across various platforms (other platforms will soon come):
Screen recording
Screen recording detection is an advanced security feature that identifies when a device's screen is being recorded. Screen recordings can pose significant security threats by capturing confidential app data, including user interactions, sensitive information displayed on the screen, and proprietary app content. By detecting screen recording, apps can take proactive steps to protect data, such as masking sensitive information or alerting users.
Below are code snippets demonstrating Screen recording detection across various platforms (other platforms will soon come):
Recommended action: Log the event on your BE or hide the sensitive content.
Screen capture protection [Android devices only]
Screen capture protection offers a method to block or unblock screen capture functionality dynamically within your application. This includes screenshots and screen recordings, helping protect sensitive information from unauthorized capture. You can block or unblock the screen capture by changing the flag between (true/false).
Below are code snippets demonstrating Screen capture protection across various platforms (other platforms will soon come):
Application of FLAG_SECURE or calling Talsec.blockScreenCapture(activity, true) disables the callbacks for detection of screenshot or screen recording.
To check whether screen capture is currently blocked in the application, you can call the following method. This allows developers to dynamically assess and adapt their app's behavior based on the screen capture state.
Code snippet for various platforms (other platforms will soon come):
For Android 11 (API 30) and lower, FLAG_SECURE is able to help around 70% of the devices reliably. This is because on certain devices, keyboard taps can be recorded.
Last updated
Was this helpful?