Android 14 has a native screenshot detection system and apps are finally using it
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.
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.
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.