Android Alarm What is the difference between four types of Alarm that AlarmManager provides and when to use what?

后端 未结 4 1345
我在风中等你
我在风中等你 2021-01-11 15:50

I want to know the difference between RTC, RTC_WAKEUP, ELAPSED_REALTIME, ELAPSED_REALTIME_WAKEUP.
I want to write an alarm application where I will set

4条回答
  •  孤城傲影
    2021-01-11 16:22

    Types of Alarms :

    • ELAPSED_REALTIME – Fires the pending intent after the specified length of time since device boot. If the device is asleep, it fires when the device is next awake.
    • ELAPSED_REALTIME_WAKEUP – Fires the pending intent after the specified length of time since device boot. It wakes up the device if it is asleep.
    • RTC – Fires the pending intent at a specified time. If the device is asleep, it will not be delivered until the next time the device wakes up.
    • RTC_WAKEUP – Fires the pending intent at a specified time, waking up the device if asleep.

提交回复
热议问题