简体   繁体   中英

Prevent Video screen capture in VideoView Activity - Android

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 with SurfaceView , you can use SurfaceView.setSecure(true) it will prevent screen capture.

hope this will help you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM