My app uses the ringtone picker and it displays the "Silent" option.
If the users picks the "Silent" option I get a null Uri in
onActivityResult; no problem here. The problem occurs the next time I
display the ringtone picker. The input URI is null but the Silent
option is not selected. Is there a special URI I need to set in
EXTRA_RINGTONE_EXISTING_URI in order to select the "Silent" option?
String uri = null;
Intent intent = new Intent( RingtoneManager.ACTION_RINGTONE_PICKER);
intent.putExtra( RingtoneManager.EXTRA_RINGTONE_TYPE,
RingtoneManager.TYPE_NOTIFICATION);
intent.putExtra( RingtoneManager.EXTRA_RINGTONE_TITLE, "Test title");
if( uri != null)
{
intent.putExtra( RingtoneManager.EXTRA_RINGTONE_EXISTING_URI,
Uri.parse( uri));
}
else
{
intent.putExtra( RingtoneManager.EXTRA_RINGTONE_EXISTING_URI,
(Uri)null);
}
startActivityForResult( intent, PICK_MY_RINGTONE);
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---