I need to figure out whether or not to restart that alarm because it's a timed server poll, but there should only be one instance of that alarm.
Asked
Active
Viewed 85 times
5
-
I would like to know this too. I checked Android AlarmManager documentation, but couldn't find any useful info. I could always test it on a device and see for myself, but I want some documentation to confirm whether the behavior is consistent across different API levels. – hitmaneidos May 15 '14 at 07:03
-
Hi, did you find answer to this question? Please share if you did. – user2731584 Jan 14 '15 at 05:56
1 Answers
0
To answer your question:
Updating your application does nothing to locally stored data, databases, PendingIntent
s, notifications, scheduled alarms in the AlarmManager
, etc. If you have pending alarms when your application is updated, they will still fire at the usual/appropriate times after the updated application is installed.
However, you can always reset your alarm if you feel the need to. Setting an alarm using the AlarmManager
will discard any previously set alarm that has a matching PendingIntent
. If you always use the same parameters in the PendingIntent
then you will never have more than one alarm scheduled.

David Wasser
- 93,459
- 16
- 209
- 274