So I've set up my app to have a repeating alarm, daily, as the user
decides, using AlarmManager. I want the user to select a ringtone for
it. This works fine, too. I store the string of the Uri they selected
in a preference to pull it back when my alarm gets run. To pull it
back, I do this:

NotificationManager notifManager = (NotificationManager)
getSystemService(Context.NOTIFICATION_SERVICE);
Notification notif = new Notification(-notification stuff-);
SharedPreferences settings = getSharedPreferences(PREFS_NAME, 0);
String reminderSound = settings.getString(getString
(R.string.RingtoneReminder), null);
if(reminderSound != null){
        notif.sound = Uri.parse(reminderSound);
}

So I set the Notification's sound field to the Uri of my notification.
Later, when I call the notifManager.notify(rowId, notif), the
notification still pops up, but the sound doesn't play.

How do I get the sound to play?
--~--~---------~--~----~------------~-------~--~----~
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