Somehow you wanted to block taking a snapshot on a certain application to disallow users share critical information(s).
I've seen this feature in some Online Banking and Finance apps. I got a little curious about it. So here is a simple code snippet;
1 | getWindow().setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE); |
Note: Make sure you call this before the setContentView inside onCreate.
No comments:
Post a Comment