Module KMP Connectivity
Internet connectivity monitor for Kotlin Multiplatform: know whether the device can actually reach the internet on Android, iOS, Desktop (JVM) and Web (JS and Wasm), as a StateFlow<Boolean>, and show a "No internet connection" banner in Jetpack Compose or Compose Multiplatform with one line.
| Module | What it gives you |
|---|---|
connectivity-core |
ConnectivityMonitor: isConnected, status, reconnected. Coroutines only, no UI. |
connectivity-compose |
ConnectivityStripLayout: the "No internet connection" / "Back online" strip. |
connectivity-ktor |
ConnectivityHints Ktor client plugin for faster detection. |
connectivity-okhttp |
ConnectivityHintsInterceptor for OkHttp on Android and JVM. |
Installation, guides and the full configuration reference are in the README on GitHub.
All modules:
A "No internet connection" strip for Jetpack Compose and Compose Multiplatform (Android, iOS, Desktop, Web).
Kotlin Multiplatform internet connectivity monitor for Android, iOS, Desktop (JVM) and Web (JS and Wasm).
A Ktor client plugin that feeds HTTP request outcomes into a io.github.lexmerciful.connectivity.ConnectivityMonitor to detect connectivity changes faster.
An OkHttp interceptor for Android and JVM that feeds request outcomes into a io.github.lexmerciful.connectivity.ConnectivityMonitor to detect connectivity changes faster.