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.
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 azip
.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.