How to prevent screen capturing in Android

Prevent screen capturing is way for saving your content. Android SDK have special flag for it. https://developer.android.com/reference/android/view/WindowManager.LayoutParams.html#FLAG_SECURE Just declare it in your Activity like this: @Override protected void onCreate(Bundle savedInstanceState) { getWindow().setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE); super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); ….. } And user will see next message when try make screenshot: