Reputation: 998
I have a android app which has a copyrighted mp3 track. I dont want users to see the mp3 that is stored in my app on music player.currently users are able to access the track using their default music player.
any lights on this issue?
Upvotes: 0
Views: 751
Reputation: 4547
Convert your file to binary refer this and the encrypt it using something like base64 while saving. while fetching do th reverse
Upvotes: 1
Reputation: 12900
There are multiple possibilities, based upon your needs, pick one, or a combination:
1) An easy solution: Put the .mp3
in your private folder. NOTE: Rooted users are still able to play/copy the mp3 file.
2) Another Easy way: rename the .mp3
to something weird, so it will not get picked up by music players. E.g. your_file.aaa
... NOTE: Rooted Users who know this file is actually an .mp3
can rename it and play/copy it
3) Or, a bit more work, encrypt/decrypt the file. This tutorial can get you started. This is an option if you absolutely want to prevent users from playing/copying the .mp3
outside your app.
Upvotes: 2
Reputation: 1090
Add a .nomedia file in the audio track directory of your app.This avoids the files being listed in music player.
Upvotes: 4