Pebble.System
System-state subscriptions sourced from Pebble event services.
Native Pebble C API
- BatteryStateService on developer.repebble.com
- ConnectionService on developer.repebble.com
Commands
batteryLevel
batteryLevel : (Int -> msg) -> Cmd msgRequest the current battery level as a percentage from 0 to 100.
connectionStatus
connectionStatus : (Bool -> msg) -> Cmd msgRequest whether the watch is connected to the phone.
Subscriptions
onBatteryChange
onBatteryChange : (Int -> msg) -> Sub msgReceive the current battery percentage when battery state changes.
onConnectionChange
onConnectionChange : (Bool -> msg) -> Sub msgReceive whether the watch is connected to the phone when connection state changes.