Runs in the background, and can communicate with the foreground app.
Determine if the worker for the current app is running.
true if running
The function app_worker_is_running does not exist in SDK 4.
Launch the worker for the current app. Note that this is an asynchronous operation, a result code of APP_WORKER_RESULT_SUCCESS merely means that the request was successfully queued up.
result code
The function app_worker_launch does not exist in SDK 4.
Kill the worker for the current app. Note that this is an asynchronous operation, a result code of APP_WORKER_RESULT_SUCCESS merely means that the request was successfully queued up.
result code
The function app_worker_kill does not exist in SDK 4.
Subscribe to worker messages. Once subscribed, the handler gets called on every message emitted by the other task (either worker or app).
A callback to be executed when the event is received
true on success
The function app_worker_message_subscribe does not exist in SDK 4.
Unsubscribe from worker messages. Once unsubscribed, the previously registered handler will no longer be called.
true on success
The function app_worker_message_unsubscribe does not exist in SDK 4.
Send a message to the other task (either worker or app).
An application defined message type
the message data structure
The function app_worker_send_message does not exist in SDK 4.
The struct AppWorkerMessage does not exist in SDK 4.
Possible error codes from app_worker_launch, app_worker_kill.
Success.
No worker found for the current app.
A worker for a different app is already running.
The worker is not running.
The worker is already running.
The user will be asked for confirmation.
The enum AppWorkerResult does not exist in SDK 4.
Callback type for worker messages. Messages can be sent from worker to app or vice versa.
An application defined message type
pointer to message data. The receiver must know the structure of the data provided by the sender.
The typedef AppWorkerMessageHandler does not exist in SDK 4.
Do you have questions about the Pebble SDK?
Do you need some help understanding something on this page?
You can either take advantage of our awesome developer community and check out the SDK Help forums, or you can join us on the Discord!