How to ensure my videos will not play outside of my Android app?

345 Views Asked by At

In my application there are 3 videos, I want to play videos in only my application, I want to protect that videos, prevent to show and play videos from FileExplorer and Gallery.

I tried Encryption and Decryption methods, I stored video with Encryption but when I play that video first I decrypt video and then play but in this case decryption process is very large so user must waiting for long-time.

4

There are 4 best solutions below

10
On

For providing strong security of your video files Encryption-Decryption is necessary. There is no other way to prevent other applications or user to access them from device. But this process is big hit on performance of accessing those files.

If you store your video files in /asset directory then there is possibility of accessing those file by extracting .apk file as a zip.

Also Even internal storage of application package /data/data/<package_name>/files is not a safe for store those files, some File-Explorer and root permission of devices access them easily.

4
On

Store your video with some odd extension and at the time of loading that video in your application change to the original extension.

enter image description here

Here Pani_-myEdit.myext is the renamed video file with .myext extension and it shows the above option

0
On

there is no such way if you want to store your files on sd card.. the videos will be visible.. even if they are in your data folder.. it is viewable from the file explorer. and if you are including videos in your asset folder then they are not visible even to your file explorer... Encryption-Decryption is an expensive way for hiding files.

use asset folder in your android project

0
On

Willing to decrypt the entire video before to start playing exposes the user to a noticeable delay. You should explore a streaming solution to avoid this problem.