I want to prevent my android application from screen video recorder.
I tried this but this code prevent only screen shot not video recorder.
getWindow().setFlags(WindowManager.LayoutParams.FLAG_SECURE,WindowManager.LayoutParams.FLAG_SECURE);
I want to prevent my android application from screen video recorder.
I tried this but this code prevent only screen shot not video recorder.
getWindow().setFlags(WindowManager.LayoutParams.FLAG_SECURE,WindowManager.LayoutParams.FLAG_SECURE);
Following code prevents screen capturing but certainly not to full extent. See the links below.
getWindow().setFlags(LayoutParams.FLAG_SECURE, LayoutParams.FLAG_SECURE);
In Java you can write above your setContentView(R.layout.activity_main);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE);
& in kotlin you can write it as
window.setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE)