1/*
2* Go to MainActivity.java file Add following import statements
3*/
4import android.view.WindowManager;
5import android.os.Bundle;
6/*
7* Add following method in MainActivity class to Prevent Screen Capture in Android
8*/
9@Override
10protected void onCreate(Bundle savedInstanceState) {
11 super.onCreate(savedInstanceState);
12 getWindow().setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE);
13}
14