Android 14 has a native screenshot detection system and apps are finally using it
Ephemeral messaging apps like Snapchat have long relied on screenshot detection to prevent users from permanently saving conversations and media. While these apps have developed their own methods to detect screenshots, Android 14 now offers a native API for this purpose.
As reported by AndroidPolice, German shopping app OTTO has become one of the first to adopt Android 14's screenshot detection API. When a user takes a screenshot within the OTTO app, a toast message is displayed informing them that their action has been detected. Developers can then implement various actions based on this notification.
As reported by AndroidPolice, German shopping app OTTO has become one of the first to adopt Android 14's screenshot detection API. When a user takes a screenshot within the OTTO app, a toast message is displayed informing them that their action has been detected. Developers can then implement various actions based on this notification.
Android 14's new screenshot detection toast notification | Source - Android Developers 
Important to note is the fact that the app is only informed of the screenshot action and not the actual contents of the screen. It's up to the app developer to determine what was on the screen when the screenshot was taken.
App Developers can then take various actions, such as notifying the other party in a messaging app that a screenshot has been captured. Google's description of the screenshot detection API is as follows:
To create a more-standardized experience for detecting screenshots, Android 14 introduces a privacy-preserving screenshot detection API. This API lets apps register callbacks on a per-activity basis. These callbacks are invoked, and the user is notified, when the user takes a screenshot while that activity is visible.
However, this API is not a perfect solution for all the ways in which a screenshot can be taken, as the API can only detect screenshots taken using the hardware button combination. Those that wish to take a stealthy screenshot without the API detecting it, can still do so by using the "Recents" task switcher screen when swiping up and holding, using ADB, or using a root screenshotting app.
Still, apps can still make use of older APIs for stricter control, which allow them to completely block the screenshot functionality. These older APIs can be seen at work in some banking and video streaming apps to protect sensitive data or copyright content.
The official Android API for screenshot detection simplifies the process for app developers, eliminating the need for custom workarounds like those used by Snapchat. However, users should continue to exercise caution when taking screenshots of conversations and other sensitive content, as the other party may be notified — or simply exercise common sense when it comes to taking screenshots of private content.
Things that are NOT allowed: