Intents and Uris, for Ringtone Picker

by droozen » Fri, 13 Mar 2009 00:02:59 GMT

Sponsored Links
 I'd like to allow the user to choose a Ringtone from my application,
that I will play later for an alarm. Looking at the javadocs, I see
EXTRA_RINGTONE_DEFAULT_URI in RingtoneManager, and extra that, it
says, is Given to the ringtone picker as a Uri. There is also an
EXTRA_RINGTONE_PICKED_URI that I would get from the returning intent:
Returned from the ringtone picker as a Uri

However, I see no intent.putExtra(String, Uri) function, so no option
to give a Uri. And there is no getUri(String) function in the Bundle
for me to get a Uri in return.

Is the RingtoneManager documentation wrong and it is given and
returned as, say, a String? Or what am I missing?

Intents and Uris, for Ringtone Picker

by Dianne Hackborn » Fri, 13 Mar 2009 02:58:27 GMT

 Uri is a Parcelable, so you can just use intent.putExtra(String,

Dianne Hackborn
Android framework engineer

Note: please don't send private questions to me, as I don't have time to
provide private support.  All such questions should be posted on public
forums, where I and others can see and answer them.


Sponsored Links

Intents and Uris, for Ringtone Picker

by Jason Parekh » Fri, 13 Mar 2009 05:33:15 GMT

 If you're using a preference activity, check out on the
RingtonePreference, it does a lot of the boilerplate work for you.



Intents and Uris, for Ringtone Picker

by droozen » Fri, 13 Mar 2009 05:34:09 GMT

 Ah, thanks. I was only look at what Uri extends (Object) and didn't
notice that it implemented Parcelable. Thanks!


Other Threads

1. Adding Prebuilt apk's to passion build

Hello all,

I am trying to add prebuilt apk's to the passion build. I can build a
working image from the source without adding the prebuild apk's.

I added lines like:


to the device-vendor-blobs (probably not supposed to)

but when i build i get:

make: *** No rule to make target `vendor/htc/passion/proprietary/
Prebuilt.apk', needed by `out/target/product/passion/./system/app/
Prebuilt.apk'.  Stop.

Looked at

But unless i have missed something, this wouldn't apply to the way i'm
doing it as its not a new vendor build, im adding them to the existing
passion build.

Any idea's?


2. arm-eabi-gcc: error trying to exec 'cc1': execvp: No such file or directory

I m tring to build Froyo 2.2 code in ubuntu10.10(64 bit sytem) but
Froyo code for 32 bit
butI am getting error like

prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi-gcc -mthumb-
interwork -o out/target/product/generic/obj/lib/crtbegin_dynamic.o -c
arm-eabi-gcc: error trying to exec 'cc1': execvp: target thumb C:
dalvikvm <= dalvik/dalvikvm/Main.c
No such file or directory


3. how to convert...?

4. AutoCompleteTextView and a ContentProvider

5. Trouble in generating the MD5 Fingerprint for SDK Debug Certificate to work on map API's

6. Camera preview frame rate very low

7. Could anyone tell me what i need to develop this app...?