Thank you for this. I accidently posted my question before I was finished composing it.
So having a unique action (=feature name) for the intent inside the pending intent isn't enough. I did see, when I did "adb ahell dumpsys alarm" and I know I had 2 alarms set, then there was only one RTC_WAKEUP entry for my app, and not 2 as I would have expected. I'll try putting in a unique request code and see if that solves the problem. Thanks On Jan 15, 10:00 am, Kostya Vasilyev <kmans...@gmail.com> wrote: > Alarms are keyed on PendingIntents, there can be only one for a given > pending intent. This is so you can update settings for an already-set alarm. > > There are rules for when PendingIntents are considered the same intent, or > different ones. Using the same Java object certainly means it's the same > intent though. > > What you can do is use a request code with PendingIntent.getBroadcast that's > unique for each alarm you want to set - three alarms, three request codes, > three unique PendingIntents. > > -- Kostya > > 2011/1/15 kl4232 <klavin4...@yahoo.com> > > > > > I have an app which I want to have 3 wake-up alarms to schedule 3 > > features of the app. > > They are all set the same way..... > > > m_intentName = "com.mypackage."+ FeatureName; > > m_alarmIntent = new Intent(m_intentName); > > m_alarmPendingIntent = PendingIntent.getBroadcast(this, 0, > > m_alarmIntent, 0); > > > When I want to set the alarm I do this... > > m_alarmMgr.set(AlarmManager.RTC_WAKEUP, System.currentTimeMillis() + > > nMinutes * 60 * 1000, m_alarmPendingIntent); > > > Then in my broadcast receiver... > > public class FeatureReceiver extends BroadcastReceiver { > > public void onReceive(Context context, Intent intent) { > > if (intent.getAction().compareTo(m_intentName) == 0) > > { > > > -- > > You received this message because you are subscribed to the Google > > Groups "Android Developers" group. > > To post to this group, send email to android-developers@googlegroups.com > > To unsubscribe from this group, send email to > > android-developers+unsubscr...@googlegroups.com<android-developers%2Bunsubscr...@googlegroups.com> > > For more options, visit this group at > >http://groups.google.com/group/android-developers?hl=en- Hide quoted text - > > - Show quoted text - -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en