0

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?

Community
  • 1
  • 1
Yogamurthy
  • 988
  • 15
  • 22

3 Answers3

4

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

nikvs
  • 1,090
  • 5
  • 9
2

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.

Entreco
  • 12,738
  • 8
  • 75
  • 95
  • I'm not aware of *obb support. Check https://developer.android.com/guide/topics/media/media-formats#audio-codecs – Entreco May 20 '20 at 11:05
1

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

Community
  • 1
  • 1
onkar
  • 4,427
  • 10
  • 52
  • 89
  • 1
    good option but this process reduces the efficiency of the app. i just want the app to store the mp3 in secured area rather than cryptions. – Yogamurthy Dec 19 '13 at 10:57
  • what is size of you mp3 file ? – onkar Dec 19 '13 at 11:04
  • 407.32 mb is my mp3 size. – Yogamurthy Dec 19 '13 at 11:05
  • When you are launching the app for the first time, then probably on splashscreen you encrypt it. When playing, ASync Task say initializing... can be useful, it will consume time but provides better security to your copyrighted data – onkar Dec 19 '13 at 11:08
  • will give a try on this and check the performance of the app. Thanks for the information onkar – Yogamurthy Dec 19 '13 at 11:11
  • Or perhaps a more better way, save the file as encrypt and decrypt the file on splashscreen... No problem Yogamurthy :) – onkar Dec 19 '13 at 11:37