Five Alarm types:
Public static final int elapsed_realtime
// When the system is sleep, this type of alarm will not wake up the system. It is not passed until the system is wake up next time. The time used for this alarm is relative time, starting from the start of the system, including the sleep time. You can call systemclock. elapsedrealtime. The system value is 3 (0x00000003 ).
Public static final int elapsed_realtime_wakeup
// Wake up the system. The usage is the same as elapsed_realtime. The system value is 2 (0x00000002 ).
Public static final int rtc
// When the system is sleep, this type of alarm will not wake up the system. It is not passed until the system is wake up next time. The time used for this alarm is absolute time and UTC time. It can be obtained by calling system. currenttimemillis. The system value is 1 (0x00000001 ).
Public static final int rtc_wakeup
// Wake up the system. The usage is the same as that of RTC. The system value is 0 (0x00000000 ).
Public static final int power_off_wakeup
// Wake up the system. It is a Shutdown Alarm, that is, the device can also wake up the system when it is shut down, so we call it a Shutdown Alarm. The usage is the same as that of RTC. The system value is 4 (0x00000004 ).