I added FLAG_SECURE to my project to protect against screenshots, but it doesn’t work, I tried it on a simple project, but it didn’t work there either. What to do?
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_SECURE,
WindowManager.LayoutParams.FLAG_SECURE);
setContentView(R.layout.activity_main);
I tried to run on 3 different projects, as well as on other devices with different versions of android, but without success
MrLane is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.