Reputation: 209
I am developing a chat application like whatsapp. In this app user can send videos, images and audio files to other users. Now the problem is - my client wants to keep all these media content private to my application. It can not be read by gallery and user can not even see them from sdcard directly. Those media files should be visible in our application only.
The first solution is to store all files in internal storage. But this is not advisable as videos and images will fill up the internal storage and user wont be able to download more apps without internal memory.
Can anyone suggest me any other approach which I can use to make my data private?
Upvotes: 0
Views: 259
Reputation: 14590
For this you have to store your data in External Storage with creating a folder name starting with the .(dot)
then this folder is hidden from the FileExplorer.In this folder you need to create a .nomedia
file and place your Images and video then images and videos are can not be visible to User in the Gallery.nomedia folder files can not be read by the gallery.
Upvotes: 2
Reputation: 4288
Rent some space on a cloud server and store them there in an encrypted form. Then when requested either decrypt them server-side and download, or pull the encrypted file down and decrypt it locally.
Upvotes: 2