2

I have a hidden directory that contains some mp3 resources and I want to make those mp3 files displayed in my alarm application. How can I add my mp3 files into ringtonePreference's ringtone list?

I have tried below but it doesn't seem to work.

@Override
protected void onPrepareRingtonePickerIntent(Intent ringtonePickerIntent) {
    super.onPrepareRingtonePickerIntent(ringtonePickerIntent);
    ringtonePickerIntent.putExtra(RingtoneManager.EXTRA_RINGTONE_EXISTING_URI, Uri.parse("file:///hidden_directory/mp3/test.mp3"));

}
  • Why is the directory hidden? You should also tag this as being Android (hence I can't help because I'm a Windows guy). – Alex Guerin Dec 30 '12 at 02:18
  • Because the directory is main resource directory of commercial device (for education) and contains some DRM-issued contents. – user1937351 Dec 30 '12 at 06:11
  • See my class "ExtraRingtonePreference" at http://stackoverflow.com/a/31004356/909406 – almisoft Jun 23 '15 at 15:01

0 Answers0