On Tue, Jun 14, 2011 at 3:16 PM, Simon Platten
<[email protected]> wrote:
> 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,

Do not use AlarmManager for things to be invoked every second. What
exactly is this application supposed to be doing?

> I am using the application context to create the PendingIntent:

Why?

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

The fourth parameter absolutely is used. Presently, the second
parameter is not, according to the docs.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training in NYC: http://marakana.com/training/android/

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