tomtu
tomtu

Reputation: 191

About the difference between the alarms of type of AlarmManager.RTC_WAKEUP and AlarmManager.RTC

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.

Upvotes: 3

Views: 1989

Answers (1)

VonC
VonC

Reputation: 1323223

THere are other instances reporting AlarmManager.RTC seems to wake up the device:

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

Upvotes: 5

Related Questions