{"id":22261670,"url":"https://github.com/marplex/gpslocation","last_synced_at":"2025-07-03T19:07:03.699Z","repository":{"id":93577724,"uuid":"472867804","full_name":"Marplex/gpslocation","owner":"Marplex","description":"An android kotlin library to easily access gps location","archived":false,"fork":false,"pushed_at":"2022-03-22T18:17:44.000Z","size":141,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T13:46:50.251Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/Marplex.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"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-03-22T17:28:34.000Z","updated_at":"2022-03-22T17:30:17.000Z","dependencies_parsed_at":"2023-08-26T18:30:31.898Z","dependency_job_id":null,"html_url":"https://github.com/Marplex/gpslocation","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Marplex/gpslocation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Marplex%2Fgpslocation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Marplex%2Fgpslocation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Marplex%2Fgpslocation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Marplex%2Fgpslocation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Marplex","download_url":"https://codeload.github.com/Marplex/gpslocation/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Marplex%2Fgpslocation/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263385653,"owners_count":23458743,"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","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":[],"created_at":"2024-12-03T09:13:45.351Z","updated_at":"2025-07-03T19:07:03.678Z","avatar_url":"https://github.com/Marplex.png","language":"Kotlin","readme":"\u003ch1 align=\"center\"\u003egpslocation\u003c/h1\u003e\n\u003cp align=\"center\"\u003e\n\tAn android kotlin library to easily access gps location\u003cbr/\u003e\n\tIt uses Fused Location Provider API and Android Location API if google services are not installed\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://opensource.org/licenses/Apache-2.0\"\u003e\u003cimg alt=\"License\" src=\"https://img.shields.io/badge/License-Apache%202.0-blue.svg\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://jitpack.io/#marplex/gpslocation\"\u003e\u003cimg alt=\"JitPack\" src=\"https://jitpack.io/v/Marplex/gpslocation.svg\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://android-arsenal.com/api?level=16\"\u003e\u003cimg alt=\"API\" src=\"https://img.shields.io/badge/API-16%2B-brightgreen.svg?style=flat\"/\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## Download\n\n```gradle\nallprojects {\n    repositories {\n        maven { url 'https://jitpack.io' }\n    }\n}\n```\n\n```gradle\ndependencies {\n    implementation \"com.github.Marplex:gpslocation:1.0.0\"\n}\n```\n\n## Usage\n\n```kotlin\nval gpsLocation = GPSLocation(context)\n```\n\n```kotlin\n// Start and stop location updates\ngpsLocation.startLocationUpdates()\ngpsLocation.stopLocationUpdates()\n```\n\n```kotlin\n//Get last cached best location\ngpsLocation.getLastKnownLocation { location -\u003e println(location) }\n\n//Get current location (with active location computation)\ngpsLocation.getCurrentLocation { location -\u003e println(location) }\n```\n```kotlin\n// Listen for location updates and status\ngpsLocation.gpsLocationListener = object: GpsLocationListener {\n\toverride fun onLocationReceived(locations: List\u003cLocation\u003e) { }\n\toverride fun onLocationStatusReceived(status: LocationStatus) {  \n\t    when(status) {  \n\t        LocationStatus.MISSING_PERMISSIONS -\u003e TODO(\"Ask gps permissions\")  \n\t        LocationStatus.PERMISSIONS_DENIED -\u003e TODO(\"Ask gps permissions\")  \n\t        LocationStatus.NO_GPS -\u003e gpsLocation.showLocationSettings(this)  \n\t    }  \n\t}\n}\n```\n## License\n```xml\nCopyright 2022 marplex (Marco Cimolai)\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarplex%2Fgpslocation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarplex%2Fgpslocation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarplex%2Fgpslocation/lists"}