I want to get ringtone name. I use this code
Ringtone ringtone = RingtoneManager.getRingtone(preference.getContext(), Uri.parse(stringValue));
String name = ringtone.getTitle(preference.getContext());
And I get number (for example - 17090) not ringtone name. What's wrong?
I had this same problem with recent versions of Android (4.4). There must be an issue with getTitle() and external storage since it works fine on internal storage. I also found that read access will also work. That may be less invasive for users.
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
I found answer. I added:
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
and it works now!
But why this permission is needed?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With