I'm trying to improve security of data in my Android app and I wonder if there is any tool or something for this problem. I can't find any solution for this on internet. I disable screen capture but users still can take photo of device display. Maybe changing resolution or combining some of colors can help this situation but I really don't have any idea.
According to this official guide, you can add WindowManager. LayoutParams. FLAG_SECURE to your window layout and it will disallow screenshots. Save this answer.
java file simply add the following code and it will prevent taking Screenshot in Android App. getWindow(). setFlags(WindowManager. LayoutParams.
A researcher has demonstrated that it's possible for malicious attackers to create an Android app that will surreptitiously take pictures and upload them to a remote server without the user being aware of or noticing it.
In short - you can't, not when your legitimate user is identical with your adversary. If the users are capable of seeing it, they are also capable of taking a picture. It's the quintessential Red Queen situation: the "anti-protection" technology reacts at the same speed as your "protection" technology evolves: if you invent unpolarized displays, users would take pictures through polarizing filters; the only thing that actually changes are the side effects.
See this for a longer version: Is it possible to protect from downloading a video from a site
(What you could try is enforcing the security through legal means instead of technologically: "I hereby agree that I can use the app only if I don't take pictures of it, in a secure room and all by myself; otherwise I lose access and I'll have to pay a $zillion fine." It does sound unenforceable, but it's still easier to implement and more effective - mainly because of FUD - than blocking the users technologically. IANAL. ;))
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