Package-level declarations
The monitor, its configuration (ConnectivityConfig), the status model and the policies.
The monitor, its configuration (ConnectivityConfig), the status model and the policies.
The monitor, its configuration (ConnectivityConfig), the status model and the policies.
The monitor, its configuration (ConnectivityConfig), the status model and the policies.
The monitor, its configuration (ConnectivityConfig), the status model and the policies.
Types
Immutable monitor configuration. Every default reproduces the reference behaviour.
DSL scope marker for the configuration builders.
Receives diagnostic messages from the monitor.
Tells whether the device can reach the internet.
Connectivity state reported by a ConnectivityMonitor.
Why a ConnectivityStatus.Disconnected status was reported.
Marks API that may change in a binary- or source-incompatible way in a minor release.
What to report when the platform monitor cannot run or a check throws.
The status reported before the platform delivers its first reading.
When ConnectivityMonitor.reconnected fires. It never fires for the first reading of the process.
What a failed request (ConnectivityMonitor.requestRecheck) does.
What a received response (ConnectivityMonitor.reportReachable) does.
The network transport behind a ConnectivityStatus.Connected status.
What counts as "connected" on platforms with native signals (Android, iOS).
Properties
true unless this is ConnectivityStatus.Disconnected.
Functions
Builds a ConnectivityConfig.
Creates the Android monitor, backed by ConnectivityManager.registerDefaultNetworkCallback. Create one per process: every monitor registers its own callback, and Android limits an app to about 100.
Builds the configuration with block and creates the Android monitor; see the overload above.
Creates the iOS monitor, backed by NWPathMonitor. Create one per process.
Builds the configuration with block and creates the iOS monitor; see the overload above.
Creates the desktop (JVM) monitor. Create one per process.
Builds the configuration with block and creates the desktop monitor; see the overload above.
Creates the web (JS / Wasm) monitor, backed by navigator.onLine and the online/offline events, plus the optional fetch probe (web { probe { ... } }). Create one per page.
Builds the configuration with block and creates the web monitor; see the overload above.
Calls onChange with every ConnectivityMonitor.isConnected value on the main thread (or Dispatchers.Default where no main dispatcher exists). For Swift and for code without coroutines.
Like observe, for ConnectivityMonitor.reconnected.
Like observe, for ConnectivityMonitor.status.