Different pointers doesn't mean they are different; use .equals() to compare them. You need to have something unique in the intent action, type, data, or categories to get different pending intent objects.
On Thu, Aug 6, 2009 at 6:03 PM, SR <[email protected]> wrote: > > I actually have the same problem with PendingIntent.getBroadcast > (...). Only the last call to AlarmManager.set() actually triggers the > broadcast to the receiver. It seems like PendingIntent.FLAG_ONE_SHOT > is the right one to use, and I am getting different PendingIntents > (judging by pointer values anyway), so I am not clear where the > problem is. > > Can someone help us figure it out? > > Thanks! > > Stan > > On Aug 4, 5:22 pm, Derek <[email protected]> wrote: > > Hi all, > > > > ThePendingIntentdocumentation describes flags. > http://developer.android.com/reference/android/app/PendingIntent.html > > > > public staticPendingIntentgetService (Context context, int > > requestCode, Intent intent, int flags) > > Flags values could be: > > FLAG_CANCEL_CURRENT:268435456 > > FLAG_NO_CREATE:536870912 > > FLAG_ONE_SHOT:1073741824 > > FLAG_UPDATE_CURRENT:134217728 > > > > I'm using the following > code:PendingIntentpendingIntent=PendingIntent.getService(this, 0, > > updateIntent, 0); > > AlarmManager alarmManager = (AlarmManager)getSystemService > > (Context.ALARM_SERVICE); > > alarmManager.set(AlarmManager.RTC, nextUpdate,pendingIntent); > > > > I'm passing zero as flag value. What flag is used then ? > > > > Whatever number of calls to alarmManager.set() with different time, > > only the last pending intent instance is taken into account. All > > previous ones seem ignored. Is this behavior related toPendingIntent > > flag ? Documentation says that requestcode is not used? > > > > Thanks. > > > -- Dianne Hackborn Android framework engineer [email protected] Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

