What is the difference between the alarms of type of RTC_WAKEUP
and RTC
?
From the documenatation of the AlarmManager
, it seems that alarms of RTC
will not wake up the device if the device current is asleep, and will not delivered until the next time the device wakes up.
But I found that the alarm of type of RTC
will still wake up the device, so what's going on?
What I did is to change the type of RTC_WAKEUP
to RTC
in the AlamrManagerService.java
, function setRepeating()
, and then set an alarm of 3 minutes from now on, then check the device, you will find that it still could be waken up by the alarm.
THere are other instances reporting
AlarmManager.RTC
seems to wake up the device:AlarmManager.RTC
doing too many updates on wakeupAlarmManager RTC
doesn't pause while device is sleepingRTC
alarm on AndroidEach time, the root cause is the same:
Something keeps the device awake (even though the screen is black).
Don't forget that a charging device (connected to power) isn't sleeping.