void app_focus_service_subscribe | ( | AppFocusHandler | handler | ) |
Subscribe to the focus event service. Once subscribed, the handler gets called every time the app focus changes.
handler | A callback to be executed on in-focus events. |
void app_focus_service_unsubscribe | ( | void | ) |
Unscribe from the focus event service. Once unsubscribed, the previously registered handler will no longer be called.
typedef void(* AppFocusHandler)(bool in_focus) |
Callback type for focus events.
in_focus | True if the app is in focus, false otherwise. |