Skip to content
Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

40 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌐 NetworkObserver

Maven Central License Kotlin Compose Multiplatform badge-android badge-ios badge-js


✨ Overview

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.


πŸ–₯️ Demo

Android IOS
Android IOS

πŸ“¦ Features

  • ⚑ Cross-platform: Android, iOS, Web/Wasm
  • πŸ“‘ Real-time network updates
  • 🌐 Network type detection: WiFi, Cellular, Ethernet, Unknown
  • 🎨 Composable-ready: integrate easily into your UI

πŸš€ Installation

Add NetworkObserver to your multiplatform project by depending on it from commonMain.

Gradle (Kotlin DSL)

kotlin {
    sourceSets {
        commonMain {
            dependencies {
                implementation("io.github.tarifchakder.networkobserver:networkobserver:<latest-version>")
            }
        }
    }
}

Version Catalog

[versions]
networkObserver = "1.0.0" # use latest version

[libraries]
network-observer = { module = "io.github.tarifchakder.networkobserver:networkobserver", version.ref = "networkObserver" }

Usage

MaterialTheme {
    Column(
        modifier = Modifier.fillMaxSize(),
        verticalArrangement = Arrangement.Center
    ) {

        val status by networkObserverAsState()
        Text("Status: $status")

        val networkType by networkTypeAsState()
        Text("Network type: $networkType")
    }
}

🀝 Contributing

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.

License

This project is distributed under the MIT License. LICENSE

About

🌐 NetworkObserver – A Lightweight Kotlin Multiplatform Library for Real-Time Network Updates

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages