Pebble.Companion.Connectivity
Phone internet connectivity exposed by the companion bridge.
This reports whether the phone companion runtime considers itself online. It does not describe watch-to-phone Bluetooth connection — use Pebble.System.connectionStatus on the watch for that.
init _ =
( model, Connectivity.current ConnectivityChanged )
subscriptions _ =
Connectivity.onConnectivity ConnectivityChangedTypes
Connectivity
type Connectivity
= Online
| OfflinePhone connectivity state reported by the companion bridge.
Commands
current
current : (Connectivity -> msg) -> Cmd msgRequest the current phone connectivity state.
setup
setup : Cmd msgRegister this platform handler with the companion bridge.
Subscriptions
onConnectivity
onConnectivity : (Connectivity -> msg) -> Sub msgReceive pushed connectivity updates from the companion bridge.
Registering this subscription also tells the bridge to send connectivity updates.