Apologies in advance for asking a question I should be able to figure
out, but I've been banging my head for hours on this and have
obviously got crossed wires in my brain.

How do I get the default ringtone to play? I've tried using SoundPool
(preferred method) and MediaPlayer to play it but I'm getting nowhere.
I've done so many dumb things, I'll just include the last fail. In the
following snippet:

String ringtone = Settings.System.DEFAULT_RINGTONE_URI.getPath();
SoundPool ringPhone = new SoundPool(1, AudioManager.STREAM_RING, 0);
int soundID =
ringPhone.load(Settings.System.DEFAULT_RINGTONE_URI.getPath(), 1);
ringPhone.play(soundID, 0.99f, 0.99f, 1, 0, 1.0f);

loads but plays nothing. When I display
Settings.System.DEFAULT_RINGTONE_URI.getPath(), it's returning /system/
ringtone

Anything that would get me pointed in the right direction would be
greatly appreciated. Thanks,

kyle

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