Determine when Pebble is connected to the phone.
The BluetoothConnectionService allows your app to know whether Pebble is connected to the phone. You can ask the system for this information at a given time or you can register to receive events every time Pebble connects or disconnects to the phone.
bool bluetooth_connection_service_peek | ( | void | ) |
Query the bluetooth connection service for the current connection status.
void bluetooth_connection_service_subscribe | ( | BluetoothConnectionHandler | handler) |
Subscribe to the bluetooth event service. Once subscribed, the handler gets called on every bluetooth connection event.
handler | A callback to be executed on connection event |
void bluetooth_connection_service_unsubscribe | ( | void | ) |
Unsubscribe from the bluetooth event service. Once unsubscribed, the previously registered handler will no longer be called.
typedef void(* BluetoothConnectionHandler)(bool connected) |
Callback type for bluetooth connection events.
connected | true on bluetooth connection, false on disconnection |