How to disable a screenshot when my application is running on an Android device? Is there a way to prevent screening?
Use Flag Secure as the flag of the layout parameter.
In the onCreate() method add a flag
onCreate()
getWindow().setFlags(WindowManager.LayoutParams.FLAG_SECURE,WindowManager.LayoutParams.FLAG_SECURE);
to setContentView();
setContentView();
Actually simple, had the same problem when playing games. Go to SETTINGS and look under DEVICES or ADDITIONAL FEATURES. From there you should see SMART CAPTURE and PALM SWIPE CAPTURE. Disconnect them ... the problem is resolved.