Using raw resource sound file as Ringtone

by Maur铆cio » Mon, 14 Dec 2009 05:32:37 GMT


Sponsored Links
 I have a problem setting a ringtone from a resource in my app:

Uri uri = Uri.parse("android.resource://com.package.app/" +
R.raw.sound1);
RingtoneManager.setActualDefaultRingtoneUri(this,
RingtoneManager.TYPE_RINGTONE, uri);

I've noticed also some people had the same problem but got no answers.
Do any of you guys have any idea of how making this work? (without
having to copy the file to the sdcard)

Cheers

--



Using raw resource sound file as Ringtone

by Open » Fri, 18 Dec 2009 07:31:36 GMT


 I was able to set a ringtone for my app like this in Android 1.6, but
it does not seem to work in 2.0.




--


Sponsored Links