On Mar 2, 8:49 am, A R <[email protected]> wrote:
> Hi,
>
>  Does anyone know how is _data column used by RingtonePickerActivity?
> I checked the tabled using sqlite browser and it has path to the
> ringtone file. Is it possible to make RingtonePicker ask my app's
> content provider for ringtones? For eg if I enter 
> content://myprovider/ringtones/1

I can't answer your specific question about the columns in the
database, but I have worked around this area.

I have a ringtone picker that returns URI's of type 
content://myprovider/ringtone/id
that send apps playing a notification to my ContentProver for the
sound data.  This works perfectly for everything *except* the system
ringtone and notification sound (i.e. I can use my picker and
ContentProvider to provide the alarm sound,  email sound, messaging
sound, talk sound, sms sound, etc.) but when I try to use the exact
same method to set the ringtone it fails (well it sets, just the
ringtone player can't play that URI).  It appears that the ringtone
player doesn't support all URI's, but I haven't yet found
documentation that supports this theory and I've been meaning to read
the code.  It's sad because I have to do a nasty hack to get sounds in
my app to be used as ringtones by copying them to the sdcard first,
which granted works but is really messy and prone to errors if users
delete/format/eject/etc the sdcard.  My guess is that it's on purpose
to ensure that when the phone rings *some* sound comes out, just in
case the ContentProvider fails in some way.

Cheers,
Scott.

-- 
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

Reply via email to