>From your onActivityResult Uri uri = data
.getParcelableExtra(RingtoneManager.EXTRA_RINGTONE_PICKED_URI); On Mon, Mar 16, 2009 at 12:50 PM, Ed99 <[email protected]> wrote: > > So I'm having trouble getting the return value from the > RingtonManager's ACTION_RINGTONE_PICKER activity... I'm sorry if > I'm just missing something basic ( I probably am... ), but I've > searched around and nothing I've found worked.. > > The activity I'm launching is this : > > http://developer.android.com/reference/android/media/RingtoneManager.html#ACTION_RINGTONE_PICKER > > I have no problem launching the activity, or getting my > onActivityResult code to run after the activity is closed. I just > can't seem to find the Uri of the ringtone they picked! > > From the docs it looks like the picked Uri should be in > EXTRA_RINGTONE_PICKED_URI ( > > http://developer.android.com/reference/android/media/RingtoneManager.html#EXTRA_RINGTONE_PICKED_URI > ) > > In my onActivityResult code, I am trying to get this value from the > data intent as: > > String ringstring = data.getStringExtra > (RingtoneManager.EXTRA_RINGTONE_PICKED_URI); > > However this string is always null.... I've tried looking at the > data object in the debugger and there doesn't seem to be any Uri > hidden in it that I can see... Am I going about getting this value > correctly? At first I thought I could just access it directly ( ie, > Uri uri = RingtoneManager.EXTRA_RINGTONE_PICKED_URI ), but that is > just a constant 'android.intent.extra.ringtone.PICKED_URI' > > Maybe there is a permission I am missing? I looked at the list and > nothing seemed associated with ringtones though... I also tried > passing in the input parameters to no avail ( it seems like they are > defaulted anyway, so I don't think that is the issue).. > > > For reference, here's how I launch the activity > > Intent i = new Intent(RingtoneManager.ACTION_RINGTONE_PICKER); > startActivityForResult( i,1); > > > Any insight would be greatly appreciated! > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

