{"id":31882588,"url":"https://github.com/mirego/konnectivity","last_synced_at":"2025-10-13T02:52:26.930Z","repository":{"id":210726886,"uuid":"530408895","full_name":"mirego/konnectivity","owner":"mirego","description":"📡 A lightweight Kotlin Multiplatform library to monitor network state changes","archived":false,"fork":false,"pushed_at":"2025-03-03T21:52:35.000Z","size":113,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":20,"default_branch":"main","last_synced_at":"2025-09-29T08:36:14.800Z","etag":null,"topics":["connectivity","kotlin-flow","kotlin-multiplatform","network-state","reachability"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mirego.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-29T22:04:45.000Z","updated_at":"2025-07-28T05:54:48.000Z","dependencies_parsed_at":"2023-12-06T23:41:33.860Z","dependency_job_id":null,"html_url":"https://github.com/mirego/konnectivity","commit_stats":null,"previous_names":["mirego/konnectivity"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/mirego/konnectivity","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mirego%2Fkonnectivity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mirego%2Fkonnectivity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mirego%2Fkonnectivity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mirego%2Fkonnectivity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mirego","download_url":"https://codeload.github.com/mirego/konnectivity/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mirego%2Fkonnectivity/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279014022,"owners_count":26085347,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["connectivity","kotlin-flow","kotlin-multiplatform","network-state","reachability"],"created_at":"2025-10-13T02:52:21.433Z","updated_at":"2025-10-13T02:52:26.923Z","avatar_url":"https://github.com/mirego.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://user-images.githubusercontent.com/5982196/205750835-4f657a00-1bca-4631-96d9-cc4acbfbd2eb.png\" width=\"600\" /\u003e\n  \u003cp\u003e\u003cbr /\u003eA lightweight Kotlin Multiplatform library to monitor network state changes\u003c/p\u003e\n  \u003ca href=\"https://github.com/mirego/kmp-boilerplate/actions/workflows/ci.yml\"\u003e\u003cimg src=\"https://github.com/mirego/kmp-boilerplate/actions/workflows/ci.yaml/badge.svg\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://kotlinlang.org/\"\u003e\u003cimg src=\"https://img.shields.io/badge/kotlin-1.9.21-blue.svg?logo=kotlin\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://opensource.org/licenses/BSD-3-Clause\"\u003e\u003cimg src=\"https://img.shields.io/badge/License-BSD_3--Clause-blue.svg\"/\u003e\u003c/a\u003e\n\u003c/div\u003e\n\n## Preview\n\nThis preview shows _Konnectivity_ running in a Web, iOS and Android app from our [sample](./sample).\n\nhttps://user-images.githubusercontent.com/5982196/233498817-240ccf01-63f3-4fe0-abd5-f538f1339343.mov\n\n## Installation\n\n### Gradle\n\nAdd the dependency to your common source-set dependencies:\n```kotlin\nsourceSets {\n    commonMain {\n        dependencies {\n             api(\"com.mirego:konnectivity:0.3.0\")\n        }\n    }\n}\n```\n\nMake sure you have [Mirego](https://open.mirego.com/)'s public Maven in your list of repositories:\n```kotlin\nrepositories {\n    maven(\"https://s3.amazonaws.com/mirego-maven/public\")\n}\n```\n\nUsing the [Kotlin CocoaPods Plugin](https://kotlinlang.org/docs/native-cocoapods.html), add the [Reachability](https://cocoapods.org/pods/Reachability) pod dependency:\n```kotlin\nkotlin {\n    cocoapods {\n        pod(\"Reachability\", \"~\u003e 3.2\")\n    }\n} \n```\n\n## Usage\n\n```kotlin\nimport com.mirego.konnectivity.Konnectivity\nimport com.mirego.konnectivity.NetworkState\nimport kotlinx.coroutines.MainScope\nimport kotlinx.coroutines.flow.launchIn\nimport kotlinx.coroutines.flow.onEach\n\nval konnectivity = Konnectivity()\n\nkonnectivity.networkState\n    .onEach { networkState -\u003e\n        when (networkState) {\n            is NetworkState.Reachable -\u003e when {\n                networkState.metered -\u003e println(\"You're online, but your connection is metered.\")\n                else -\u003e println(\"You're online!\")\n            }\n            NetworkState.Unreachable -\u003e println(\"You're offline.\")\n        }\n    }\n    .launchIn(MainScope())\n```\n\n\n## License\n\nKonnectivity is © 2023 [Mirego](https://www.mirego.com) and may be freely distributed under\nthe [New BSD license](http://opensource.org/licenses/BSD-3-Clause). See\nthe [`LICENSE.md`](https://github.com/mirego/konnectivity/blob/main/LICENSE.md) file.\n\n## About Mirego\n\n[Mirego](https://www.mirego.com) is a team of passionate people who believe that work is a place\nwhere you can innovate and have fun. We’re a team of [talented people](https://life.mirego.com) who\nimagine and build beautiful Web and mobile applications. We come together to share ideas\nand [change the world](http://www.mirego.org).\n\nWe also [love open-source software](https://open.mirego.com) and we try to give back to the\ncommunity as much as we can.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmirego%2Fkonnectivity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmirego%2Fkonnectivity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmirego%2Fkonnectivity/lists"}