|
PebbleOS v4.47.0-512-g5285d4236
|
Scheduled app launches. More...
Data Structures | |
| struct | WakeupInfo |
| Wakeup event passed to the app it launches. More... | |
Macros | |
| #define | WAKEUP_EVENT_WINDOW 60 |
| Time reserved around each event, in seconds, in which the same app can't schedule another event. | |
| #define | MAX_WAKEUP_EVENTS_PER_APP 8 |
| Maximum number of events per app. | |
| #define | WAKEUP_CATCHUP_WINDOW (WAKEUP_EVENT_WINDOW / 2) |
| Minimum gap, in seconds, between events of different apps scheduled close together, and between events caught up after a time change or after the service was disabled (e.g. | |
Typedefs | |
| typedef int32_t | WakeupId |
| WakeupId is an identifier for a wakeup event. | |
Functions | |
| void | wakeup_init (void) |
| Initialize the service. | |
| void | wakeup_enable (bool enabled) |
| Enable or disable the service. | |
| struct pbl_delayed_work * | wakeup_get_current (void) |
| Get the timer used to schedule events, for tests. | |
| WakeupId | wakeup_get_next_scheduled (void) |
| Get the next scheduled event, for tests. | |
| void | wakeup_migrate_timezone (int utc_diff) |
| Convert events scheduled in local time to UTC after the timezone was set. | |
| void | wakeup_handle_significant_clock_change (void) |
| Handle a significant time change (over 15 s, timezone or DST). | |
| void | wakeup_handle_clock_change (void) |
| Handle any time change, including small RTC calibrations. | |
Scheduled app launches.
Kernel side of the app wakeup API. Events are stored in the "wakeup" settings file and the next one is scheduled with delayed work. When an event fires, its app is launched with APP_LAUNCH_WAKEUP, or receives a PEBBLE_WAKEUP_EVENT if already running. Events missed while the watch was off can be reported with a popup.
| struct WakeupInfo |
Wakeup event passed to the app it launches.
| Data Fields | ||
|---|---|---|
| WakeupId | wakeup_id | Event identifier. |
| int32_t | wakeup_reason | Reason given by the app when scheduling the event. |
| #define MAX_WAKEUP_EVENTS_PER_APP 8 |
Maximum number of events per app.
| #define WAKEUP_CATCHUP_WINDOW (WAKEUP_EVENT_WINDOW / 2) |
Minimum gap, in seconds, between events of different apps scheduled close together, and between events caught up after a time change or after the service was disabled (e.g.
low power mode).
| #define WAKEUP_EVENT_WINDOW 60 |
Time reserved around each event, in seconds, in which the same app can't schedule another event.
| typedef int32_t WakeupId |
WakeupId is an identifier for a wakeup event.
| void wakeup_enable | ( | bool | enabled | ) |
Enable or disable the service.
While disabled no event fires; pending ones are caught up when re-enabled.
| enabled | True to enable. |
| struct pbl_delayed_work * wakeup_get_current | ( | void | ) |
Get the timer used to schedule events, for tests.
| WakeupId wakeup_get_next_scheduled | ( | void | ) |
Get the next scheduled event, for tests.
| void wakeup_handle_clock_change | ( | void | ) |
Handle any time change, including small RTC calibrations.
Reschedules the next event without deleting events or showing popups.
| void wakeup_handle_significant_clock_change | ( | void | ) |
Handle a significant time change (over 15 s, timezone or DST).
Deletes past events, shows missed event popups and reschedules, on SysWorkq.
| void wakeup_init | ( | void | ) |
Initialize the service.
Deletes expired events, shows a popup for apps that missed an event while the watch was off and asked to be notified, and schedules the next event.
| void wakeup_migrate_timezone | ( | int | utc_diff | ) |
Convert events scheduled in local time to UTC after the timezone was set.
| utc_diff | Local time minus UTC, in seconds. |