I am curious to know if screenshots can be disabled when running a android app if I were to design one.
Asked
Active
Viewed 175 times
0
-
why would you want to? If you don't want your app's display to be captured, what's to stop someone from using ANOTHER camera to take a picture of their screen? – Marc B Jul 25 '13 at 14:52
-
http://stackoverflow.com/questions/6764568/prevent-screen-capture-in-android-apps – Skaard-Solo Jul 25 '13 at 14:54
1 Answers
2
You are welcome to use FLAG_SECURE
to block screenshots and thumbnails of your activities:
public class FlagSecureTestActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getWindow().setFlags(LayoutParams.FLAG_SECURE,
LayoutParams.FLAG_SECURE);
setContentView(R.layout.main);
}
}

CommonsWare
- 986,068
- 189
- 2,389
- 2,491