{"id":13658575,"url":"https://github.com/line/abc-kmm-location","last_synced_at":"2025-08-11T06:05:52.682Z","repository":{"id":45653260,"uuid":"417334045","full_name":"line/abc-kmm-location","owner":"line","description":"Location Service Manager for Kotlin Multiplatform Mobile iOS and Android","archived":false,"fork":false,"pushed_at":"2023-03-20T22:41:19.000Z","size":195,"stargazers_count":101,"open_issues_count":1,"forks_count":8,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-03-30T18:35:33.512Z","etag":null,"topics":["android","corelocation","fusedlocationapi","googleservice","ios","kotlin-multiplatform","location-service"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/line.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","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}},"created_at":"2021-10-15T01:32:50.000Z","updated_at":"2025-03-14T23:46:57.000Z","dependencies_parsed_at":"2024-01-17T03:26:14.295Z","dependency_job_id":null,"html_url":"https://github.com/line/abc-kmm-location","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/line/abc-kmm-location","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/line%2Fabc-kmm-location","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/line%2Fabc-kmm-location/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/line%2Fabc-kmm-location/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/line%2Fabc-kmm-location/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/line","download_url":"https://codeload.github.com/line/abc-kmm-location/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/line%2Fabc-kmm-location/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269838444,"owners_count":24483200,"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-08-11T02:00:10.019Z","response_time":75,"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":["android","corelocation","fusedlocationapi","googleservice","ios","kotlin-multiplatform","location-service"],"created_at":"2024-08-02T05:01:00.826Z","updated_at":"2025-08-11T06:05:52.659Z","avatar_url":"https://github.com/line.png","language":"Kotlin","funding_links":[],"categories":["Libraries"],"sub_categories":["📱 Device"],"readme":"![abc-kmm-location: Location Service Manager for Kotlin Multiplatform Mobile iOS and android](images/cover.png)\n\n[![Kotlin](https://img.shields.io/badge/kotlin-1.5.21-blue.svg?logo=kotlin)](http://kotlinlang.org)\n[![KMM](https://img.shields.io/badge/KMM-0.2.7-lightgreen.svg?logo=KMM)](https://plugins.jetbrains.com/plugin/14936-kotlin-multiplatform-mobile)\n[![AGP](https://img.shields.io/badge/AGP-7.0.1-green.svg?logo=AGP)](https://developer.android.com/studio/releases/gradle-plugin)\n[![Gradle](https://img.shields.io/badge/Gradle-7.0.2-blue.svg?logo=Gradle)](https://gradle.org)\n[![Platform](https://img.shields.io/badge/platform-ios,android-lightgray.svg?style=flat)](https://img.shields.io/badge/platform-ios-lightgray.svg?style=flat)\n\nLocation Service Manager for Kotlin Multiplatform Mobile iOS and android\n\n## Features\n- Super easy to use location capability in one interface\n- Provides simple permission settings and management\n- Dramatically reduce code to write\n- Common interface available on KMM Shared\n\n## Usage\n\n### Register handlers for permissions\n\n- Android\n\n    ```kotlin\n    ABCLocation\n        .onPermissionUpdated(this) { isGranted -\u003e\n            println(\"onPermissionUpdated -\u003e isGranted: $isGranted\")\n        }\n        .onLocationUnavailable(this) {\n            println(\"onLocationUnavailable\")\n        }\n    ```\n\n- iOS\n\n    ```swift\n    ABCLocation.Companion()\n        .onPermissionUpdated(target: self) { isGranted -\u003e\n            print(\"onPermissionUpdated -\u003e isGranted: \\(isGranted)\")\n        }\n        .onLocationUnavailable(target: self) {\n            print(\"onLocationUnavailable\")\n        }\n        .onAlwaysAllowsPermissionRequired(target: self) {\n            print(\"onAlwaysAllowsPermissionRequired\")\n        }\n    ```\n\n### To get current location just once\n\n- Android\n\n    ```kotlin\n    ABCLocation.currentLocation { data -\u003e\n        println(\"currentLocation -\u003e data: $data\")\n    }\n    ```\n\n- iOS\n\n    ```swift\n    ABCLocation.Companion().currentLocation { data in\n        print(\"currentLocation -\u003e data: \\(data)\")\n    }\n    ```\n\n### To get current location whenever location changes\n\n- Android\n\n    ```kotlin\n    ABCLocation\n        .onLocationUpdated(this) { data -\u003e\n            println(\"onLocationUpdated -\u003e data: $data\")\n        }\n        .startLocationUpdating()\n    ```\n\n- iOS\n\n    ```swift\n    ABCLocation.Companion()\n        .onLocationUpdated(target: self) { data in\n            print(\"onLocationUpdated -\u003e data: \\(data)\")\n        }\n        .startLocationUpdating()\n    ```\n\n### To stop location updating\n\n- Android\n\n    ```kotlin\n    ABCLocation.stopLocationUpdating()\n    ```\n\n- iOS\n\n    ```swift\n    ABCLocation.Companion().stopLocationUpdating()\n    ```\n\n\n## Installation\n\n### Gradle Settings\nAdd below gradle settings into your KMP (Kotlin Multiplatform Project)\n\n#### build.gradle.kts in shared\n\n```kotlin\nplugins {\n    id(\"com.android.library\")\n    kotlin(\"multiplatform\")\n}\n\nval abcLocationLib = \"com.linecorp.abc:kmm-location:0.2.4\"\n\nkotlin {\n    android()\n    ios {\n        binaries\n            .filterIsInstance\u003cFramework\u003e()\n            .forEach {\n                it.baseName = \"shared\"\n                it.transitiveExport = true\n                it.export(abcLocationLib)\n            }\n    }\n\n    sourceSets {\n        val commonMain by getting {\n            dependencies {\n                implementation(abcLocationLib)\n            }\n        }\n        val commonTest by getting {\n            dependencies {\n                implementation(kotlin(\"test-common\"))\n                implementation(kotlin(\"test-annotations-common\"))\n            }\n        }\n        val androidMain by getting {\n            dependencies {\n                implementation(\"com.google.android.material:material:1.2.1\")\n                implementation(abcLocationLib)\n            }\n        }\n        val androidTest by getting {\n            dependencies {\n                implementation(kotlin(\"test-junit\"))\n                implementation(\"junit:junit:4.13.2\")\n                implementation(\"androidx.test:core:1.0.0\")\n                implementation(\"androidx.test:runner:1.1.0\")\n                implementation(\"org.robolectric:robolectric:4.2\")\n            }\n        }\n        val iosMain by getting {\n            dependencies {\n                implementation(abcLocationLib)\n            }\n        }\n        val iosTest by getting\n    }\n}\n```\n### Project Settings\nAndroid\n- You can use right now without other settings.\n\niOS\n1. Create `Podfile` with below setting in your project root.\n```bash\nuse_frameworks!\n\nplatform :ios, '10.0'\n\ninstall! 'cocoapods', :deterministic_uuids =\u003e false\n\ntarget 'iosApp' do\n    pod 'shared', :path =\u003e '../shared/'\nend\n```\n2. Run command `pod install` on the terminal\n\n\n## Requirements\n- iOS\n  - Deployment Target 10.0 or higher\n- Android\n  - minSdkVersion 21\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fline%2Fabc-kmm-location","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fline%2Fabc-kmm-location","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fline%2Fabc-kmm-location/lists"}