For one of our secure apps, there is a requirement to disable the screenshot capability for the app in Android ICS. Is this possible on a non-rooted device?
Thanks,
Rajath
But if you only want to block it for normal android devices, the SECURE FLAG is substantial. 1) The secure flag does block both normal screenshot and video capture. Window flag: treat the content of the window as secure, preventing it from appearing in screenshots or from being viewed on non-secure displays.
The Project Settings dialog box appears. From the left pane, expand the Native tab, and then select the Android Mobile/Tablet sub-tab. In the Miscellaneous section, enable the Disable Application Screenshot check box.
Why don't you add this line in your activity class. This will do the trick.
// This disables screen shot to be taken for current activity
getWindow().setFlags(LayoutParams.FLAG_SECURE, LayoutParams.FLAG_SECURE);
You may want to have a look at Mark Murphy's blog post.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With