Periodic "poll services" requests to the phone app.
More...
Periodic "poll services" requests to the phone app.
iOS does not let apps do networking in the background, but a Bluetooth message grants the app a limited time to run. The watch thus periodically asks the phone to poll web services such as email. Intervals are configured per service, usually by the phone (endpoint 0xcafe).
◆ PollRemoteService
Service the phone is asked to poll.
| Enumerator |
|---|
| POLL_REMOTE_SERVICE_MAIL | Email.
|
| POLL_REMOTE_SERVICE_DATA_SPOOLING | Data spooling.
|
| NUM_POLL_REMOTE_SERVICES | Number of services.
|
◆ poll_remote_init()
| void poll_remote_init |
( |
void |
| ) |
|
Initialize the per-service state.
◆ poll_remote_send_request()
Send a poll request now, for instance on user interaction.
Does nothing if less than the minimum interval elapsed since the last request, or when there is no system session. A sent request restarts the interval count.
- Parameters
-
◆ poll_remote_set_intervals()
| void poll_remote_set_intervals |
( |
PollRemoteService |
service, |
|
|
const uint8_t |
min_interval_minutes, |
|
|
const uint8_t |
max_interval_minutes |
|
) |
| |
Set the polling intervals of a service.
- Parameters
-
| service | Service to configure. |
| min_interval_minutes | Minimum time between two requests; poll_remote_send_request() does nothing before it elapsed. |
| max_interval_minutes | Interval of the automatic requests, 0 to disable them. |
◆ poll_remote_start()
| void poll_remote_start |
( |
void |
| ) |
|
Start sending poll requests at the configured intervals.
Restarts the interval count of every service. Does nothing if already started.
- See also
- poll_remote_stop
◆ poll_remote_stop()
| void poll_remote_stop |
( |
void |
| ) |
|
Stop sending poll requests.
Does nothing if already stopped.
- See also
- poll_remote_start