Yogamurthy
Yogamurthy

Reputation: 998

securing the mp3 in my android app

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

Answers (3)

onkar
onkar

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

Entreco
Entreco

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

nikvs
nikvs

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

Related Questions