Reputation: 3305
I know there are a lot of posts about storing images on disk, both for Android and iPhone. What I would like to know is how to hide these files from user (disable access from both device itself and PC sd-card reader).
I want my app to download copyrighted images that should be only accessed using my application.
Upvotes: 1
Views: 267
Reputation: 38727
SD cards are FAT formatted, i.e. all content is available to all. Your only real option is encryption. You can probably adapt the code here to encrypt and decrypt a file: http://www.androidsnippets.org/snippets/39/
Obviously you'd have your app generate a random key on first run, and store it in your preferences (which is private to your app on internal storage).
Upvotes: 1
Reputation: 13815
You can encrypt the downloaded bytes and then save it with any of your own format file extension. Then save it on your disk. While Reading Decrypt the data and use it accordingly.
This the only way i think to implement this. Hope it helps :)
Upvotes: 1