Android: 5 Alarm types

Source: Internet
Author: User

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 ).
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.