securing the mp3 in my android app

730 Views Asked by At

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?

3

There are 3 best solutions below

1
On

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.

1
On

Add a .nomedia file in the audio track directory of your app.This avoids the files being listed in music player.

6
On

Convert your file to binary refer this and the encrypt it using something like base64 while saving. while fetching do th reverse