I can't seem to create multiple alarms. In the code below, the last
alarm's onReceive gets fired but not the first one.

                AlarmManager sleepAlarm = (AlarmManager)
getSystemService(ALARM_SERVICE);
                AlarmManager wakeupAlarm = (AlarmManager)
getSystemService(ALARM_SERVICE);
                wakeupAlarm.set(AlarmManager.RTC_WAKEUP,
                                wakeupTime.getTimeInMillis(), 
wakeupPendingIntent);
                sleepAlarm.set(AlarmManager.RTC_WAKEUP,
                                sleepTime.getTimeInMillis(), 
sleepPendingIntent);

If I move sleepAlarm before wakeupAlarm, then wakeupAlarm's onReceive
fires. I've tried it also with a single AlarmManager and PendingIntent
but it only fires the last one created. I'd appreciate any advice or
things to try.

--
George Brown

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