Confirmed users
110
edits
m (→Examples) |
|||
Line 24: | Line 24: | ||
The Alarm API supports the following features: | The Alarm API supports the following features: | ||
* Web | * Web applications can add multiple alarms and get a returned ID for each of them. | ||
* Web | * The returned ID is unique and can be further used to specify and remove the alarm. | ||
* When the alarm goes off, an alarm message will be fired and can be handled by | * Web applications can pass a customized JSON object to descirbe more details about each alarm setting. | ||
* All the alarms that have been set can be automatically restored even if a | * When the alarm goes off, an alarm message will be fired and can be handled by the System Message Handler. | ||
* All the alarms that have been set can be automatically restored even if a system reboot is encountered. | |||
* Alarm API actually does more than setTimeout because it can actively *wake up* the system from sleeping. | |||
* Whenever the system clock or timezone is adjusted at run-time, all the saved alarms will be rescheduled. | |||
== Proposed API == | == Proposed API == |