The parameters are definitely used. The second one uniquely identifies the pending intent.
The fourth one controls what happens when there is / is not an existing pending intent just like the one being created. Canceling the old pending intent before setting a new alarm is not necessary, the docs are quite clear about this. -- Kostya 2011/6/14 Simon Platten <simonaplat...@googlemail.com> > When I update an alarm I call the alarm manager cancel method before > setting it up...However this doesn't always cancel the old alarm and > sometimes I seem to get more than one alarm scheduled at different rates. > > In my activity I let the user change the alarm time interval, this is then > applied to the alarm manager, but if I set one alarm running at 1000 ms, > then cancel it and set again to be 60000ms, the previous alarm still fires, > I am using the application context to create the PendingIntent: > > PendingIntent sender = PendingIntent.getBroadcast(context, 12345, intent, > PendingIntent.FLAG_UPDATE_CURRENT); > > I believe from examples I have seen that the 2nd and 4th parameters aren't > actually used. > > -- > Regards, > Sy > > -- > 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 -- 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