How to play an encrypted video file in Android
I searched through a lot of questions on SO but I can't find the answer, that's why I ask the following question: An Android app should be able to play an encrypted video file (stored on the SD card and retrieved from a webserver). The file has to be stored on the SD card so that the app can play the video file without having an active internet connection. Because the video files may not be copied, the plan is to encrypt them server side when uploading the files to a webserver. What is the best option? 1) I have seen suggestions for running a local webserver which decrypts the file (and how to do this?) 2) or should we decrypt the file, save it as a temporary file and set this temporary file as the source for the videoplayer? 3) something completely different?
You are trying to implement a DRM scheme, and a naive one at that. Look into DRM schemes and report back if you cannot implement the impossible. All you can hope for is obfuscation, and there are plenty of ways of doing that (none of them are secure of course).
You will expose the user to a waiting time if you choose to decrypt a entire big video beforehand. As of the security, you can guess it's a poor idea to have the contents in clear in a file, even temporary. The local webserver is a better choice because it's a streaming method, so without file storage. There is no class for an http server in the SDK, you have to implement your own one, otherwise look for an existing library similar to LocalSingleHttpServer.
StackOverflowError when using ViewCompat
Getting image from Django on AWS, to Android Glide. 404 error
Tablayout tab with multiple fragment
Android Rating bar displays only one star
How to disable back button behavior?
How to remove extra space space in DatePickerDialog (seen on Android M & N)?
Is Ibeacon of ios can connect with android beacon technology and vice versa?
Does `adb shell top` show the average cpu usage over the update time?
how to create dynamic ui from api response [closed]
Generate SHA1 Fingerprint in Android studio 2.2
Image view is not scrolling
Why does Ionic default has-bouncing on ion-content to false?
Getting compilation error when using Refrofit simple xml converter
How does 'weight' make an element fill available space in an Android layout?
No “unaligned” apks are generated with gradle plugin 2.2.0, breaking Spoon runner
Galaxy S6 does not take photos with camera2 API and flashlight