0

Currently i am using FLAG_SECURE method to disable the screenshot functionality but users having Android P are able to take screenshots. How to restrict that?

This is not working for Android P: getWindow().setFlags(WindowManager.LayoutParams.FLAG_SECURE,WindowManager.LayoutParams.FLAG_SECURE);

Thanks in Advance.

  • As far as I know, this is the only method available as of now. No official documentation is available. You might have to do some hack or other non traditional methods which I am not aware of, sorry. – Deepak kaku Mar 19 '19 at 16:11
  • https://stackoverflow.com/a/52976001/6142219 -> maybe this helps – Deepak kaku Mar 19 '19 at 16:16
  • i am using the same, and i have android P. it works for me without any issue.. Whenever user takes screenshot (even with 3rd party apps), it gives black screen – Masoom Badi Mar 19 '19 at 20:16
  • @Deepakkaku the solution suggested by you wont work. Read the comment under that post. – Akansha Goel Mar 20 '19 at 04:16
  • @Sam. have you tried on One plus with Android 9 . and whats the status in this case? – Akansha Goel Mar 20 '19 at 04:18
  • @AkanshaGoel i have not tried in One plus (Oxygen OS). But i tried and it works fine for Lineage OS, MI, Asus, Samsung devices.. so it must work for one plus... don't know how it is not working for you.. or may be it is cause of oxygen os.. – Masoom Badi Mar 20 '19 at 13:11

0 Answers0