Android ringtone selection list with default option selected

I am trying to display the window selection dialog in android with the default selection instead of “No”, which it is currently, to select the default sound / ringtone.

Here is the code I tried:

Intent intent = new Intent(RingtoneManager.ACTION_RINGTONE_PICKER); intent.putExtra(RingtoneManager.EXTRA_RINGTONE_TYPE, RingtoneManager.TYPE_NOTIFICATION | RingtoneManager.TYPE_RINGTONE); intent.putExtra(RingtoneManager.EXTRA_RINGTONE_SHOW_DEFAULT, true); intent.putExtra(RingtoneManager.EXTRA_RINGTONE_DEFAULT_URI, RingtoneManager .getDefaultUri(RingtoneManager.TYPE_NOTIFICATION)); startActivityForResult(intent, 0); 

See screenshot for more details. enter image description here

+6
source share
1 answer

Have you tried this? Ringtone Set - Radio Button Set

+6
source

Source: https://habr.com/ru/post/975111/


All Articles