Android Make My App Files Only Play From Inside The App
Solution 1:
well this is not a programming question, but ...
you have 2 options here, decide based on your requirements
1) if you want the records to be simply not appear in any player or multi media app, you have 2 options: A- let the storing folder name starts with . (ex, .myrecords) OR B- add a file inside the folder named .nomedia
but this will not PROTECT the records, as if someone mounts the sd-card records can be copied and played on any device/pc
2) if you want to secure the files, you will need to encrypt them as advised by Joey Chong so once the recording completed, the file got encrypted, and stored on external storage once the user enters the playback screen, and picks a file to play, the app will decrypt it first, in a new (temp file) then play it, and delete the temp file once user leaves the playback screen.
-- for exporting the records to PC or other devices, you can add a function (button maybe) to export selected records, that simply decrypts the selected files into a specific folder, say (/appfolder/exported/) then user can copy them or do whatever... and user have to DELETE the files at export folder once purpose of export is ended. (maybe a button too) Clear Exported
storing in internal is not good idea, specially audio/video as it might be large files, and some devices does not have really large internal storage.
this could be more a comment but its way too long
Solution 2:
Is internal storage that you mention mean private location inside your app? As far as I know even you put in internal storage, Media player still able to locate the file unless it is inside your app private location.
What you can do is encrypt the file and store in external storage. When you need to play back, decrypt the file to your app private location and playback.
Post a Comment for "Android Make My App Files Only Play From Inside The App"