I want to Prevent Video screen capture (screen graving) in my PlayerActivity, I use VideoView.
I already tried this
getWindow().setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE);
But it works only on some activity.
If you're using
VideoView
withSurfaceView
, you can useSurfaceView.setSecure(true)
it will prevent screen capture.hope this will help you.