How to privately store videos on sd card
I'm a beginner to android and need some help. The app I'm making lets the user purchase and download high resolution videos from a server. These videos are stored on the SD card.
This creates two problems for me:
- Once on the SD card the files can be publicly viewed and copied to other locations.
- When the app is uninstalled the files remain on the SD card and take up a lot of space.
My questions:
Can I make the videos private to my app? From what I understand storing to Internal Storage provides that privacy. However, Internal Storage is not the SD card and therefore provides only limited space - and the videos require a lot of space.
When the app is uninstalled - is there a way to make sure the videos are removed from the SD card.
Please tell me if you ne开发者_JAVA技巧ed more information! Thanks for being a great community!
You can encrypt your videos using a block cipher stream.
CipherOutputStream
If you place a file on the phone there is nothing that can stop a user from getting access to that file you create.
Getting rid of any videos the application is easy just keep track of it.
I suppose you could encrypt the file which would prevent most users from downloading the file off their phone.
you could always embed the videos in a sqlite database and then lock down the db. That way when you uninstall it takes the videos with it.
精彩评论