Alarmmanager Phone Alarm Clock Introduction

Source: Internet
Author: User

1.void set (int type, long triggerattime, pendingintent operation): Sets the component specified by the operation parameter to start at triggerattime time.

The first parameter specifies the type of the timer service, which accepts the following values:

Elapsed_realtime: Specifies the component that will start the operation after a certain amount of time from the time it starts.

Elapsed_realtime_wakeup: Specifies that the component corresponding to the operation is started after a certain amount of time from now on, even if the system shuts down will execute the corresponding component of the operation.

RTC: Specifies the component that initiates operation when the system calls the System.currenttimemills () method to return a value equal to Triggerattime.

Rtc_wakeup: Specifies the component that initiates operation when the system calls the System.currenttimemills () method to return a value equal to triggerattime, even if the system shutdown is performed

The corresponding component of the operation.

2.void setinexactrepeating (int type, long triggerattime, long interval, pendingintent operation): sets a non-precise recurring task,

3.void setrepeating (int type, long triggerattime, long interval, pendingintent operation): Sets a recurring timer service.

4, void Cancel (Pendingintent operation): Cancel the Alarmmanager timer service.

Alarmmanager Phone Alarm Clock Introduction

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.