I am developing an Android application that puts high priority on protecting user data, to the point that they do not store anything in read-only memory on the local device.
To further protect user data, we want to make a web service call to our server whenever someone tries to take a screenshot of the active application.
The solutions I've seen so far include this snippet , designed to prevent taking a screenshot and throwing a screenshot error message in Toast to the user. Another approach I considered was to listen to the combination of the Volume Down and Power buttons that some devices use for screenshots (although devices like Samsung S4 deviate from this method). My last resort was going to use FileObserver at the location of the screen gallery for changes while the application was running, but it also seems to be a suboptimal solution and introduces a permission request that I would rather not have. I also cannot be sure of the purpose of the file for the images.
I believe the Snapchat app can alert participants when a remote user tries to take a screenshot. Do you have any suggestions on how this function can be implemented, except for rooting the device? Informal methods are also welcome.
android security screenshot
Brandon docker
source share