Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prevent other applications form capturing/recording screen

Tags:

Basically i want VIDEO PIRACY PROTECTION

My application has video streaming and I want to protect my video streaming from other applications. Other applications should not be able to capture screen while my video is playing. Any suggestions how can i achieve this.. Thanks in advance.

like image 653
Ajay Avatar asked Jun 03 '15 10:06

Ajay


People also ask

Is it possible to prevent screen capture?

Screen Capture protection is possible in Android App, IOS App or IOs browser, but desktop and android browsers can not prevent screen capture.

Can an application detect screen recording?

screen recording is not detectable for websites but can be tracked by apps. This is primarily to protect copyrighted content and prevent pirating. For example, the Netflix desktop/iOS app can detect screen recording to prevent other people from profiting off of their content.

How do I protect my screen recording?

Haihaisoft Smart Prevent Screen Recording Technology is available for Windows, MacOS, Android, and iOS. It eliminates most of the screen recording software. You can turn on the Blacklist, Smart Prevent Screen Recording Technology and Dynamic Digital Watermark in the DRM-X 4.0, with triple protection it's more secure.


2 Answers

You can secure screen capturing functionality by adding FLAG_SECURE into your Activity as follows

  getWindow().setFlags(LayoutParams.FLAG_SECURE, LayoutParams.FLAG_SECURE); 

Check this link which says

Screen capturing and sharing

Android 5.0 lets you add screen capturing and screen sharing capabilities to your app with the new android.media.projection APIs. This functionality is useful, for example, if you want to enable screen sharing in a video conferencing app.

The new createVirtualDisplay() method allows your app to capture the contents of the main screen (the default display) into a Surface object, which your app can then send across the network. The API only allows capturing non-secure screen content, and not system audio. To begin screen capturing, your app must first request the user’s permission by launching a screen capture dialog using an Intent obtained through the createScreenCaptureIntent() method.

Also documentation at this link says that

Window flag: treat the content of the window as secure, preventing it from appearing in screenshots or from being viewed on non-secure displays.

Above solution will surely prevent applications from capturing Video of your app

like image 69
silwar Avatar answered Oct 18 '22 20:10

silwar


  getWindow().setFlags(LayoutParams.FLAG_SECURE, LayoutParams.FLAG_SECURE);

write above setContenView();

It prevents only snapshot capturing. And also prevents video capturing. But For video capturing its device specific.

like image 25
arshad shaikh Avatar answered Oct 18 '22 21:10

arshad shaikh