NetworkObserver is a lightweight Kotlin Multiplatform library built for Compose Multiplatform. It provides a simple, unified API to monitor network connectivity across Android, iOS, and Web/Wasm, with real-time updates and platform-specific insights.
| Android | IOS |
|---|---|
![]() |
![]() |
- β‘ Cross-platform: Android, iOS, Web/Wasm
- π‘ Real-time network updates
- π Network type detection: WiFi, Cellular, Ethernet, Unknown
- π¨ Composable-ready: integrate easily into your UI
Add NetworkObserver to your multiplatform project by depending on it from commonMain.
kotlin {
sourceSets {
commonMain {
dependencies {
implementation("io.github.tarifchakder.networkobserver:networkobserver:<latest-version>")
}
}
}
}[versions]
networkObserver = "1.0.0" # use latest version
[libraries]
network-observer = { module = "io.github.tarifchakder.networkobserver:networkobserver", version.ref = "networkObserver" }MaterialTheme {
Column(
modifier = Modifier.fillMaxSize(),
verticalArrangement = Arrangement.Center
) {
val status by networkObserverAsState()
Text("Status: $status")
val networkType by networkTypeAsState()
Text("Network type: $networkType")
}
}Issues and PRs are welcome! If youβd like to add features or fix bugs, please open an issue first so we can discuss scope and approach.
This project is distributed under the MIT License. LICENSE

