Skip to content Skip to sidebar Skip to footer

Alarmmanager - Expected Behaviour Of Alarm When Device Time Is Changed?

Assume I set an alarm using the AlarmManager.set(int type, long triggerAtMillis, PendingIntent operation) method for 2pm today and the current time is 1pm. Now, if I change the tim

Solution 1:

No that will not triggered by AlarmManager. So you should listen about time change actions and re-create the alarm.

Those actions are

Intent.ACTION_TIME_TICK
Intent.ACTION_TIMEZONE_CHANGED
Intent.ACTION_TIME_CHANGED

does Alarm Manager persist even after reboot? is a better answer to understand your problem and resolve that.

Solution 2:

Please ignore question. I've found my answer here and a suggested solution:

Date and time change listener in Android?

If anyone has an alternative answer or solution, please do post!

Post a Comment for "Alarmmanager - Expected Behaviour Of Alarm When Device Time Is Changed?"