{"id":21313869,"url":"https://github.com/akexorcist/googledirectionlibrary","last_synced_at":"2025-06-22T06:39:10.552Z","repository":{"id":54826965,"uuid":"47086810","full_name":"akexorcist/GoogleDirectionLibrary","owner":"akexorcist","description":"[Android] Library for Google Direction API for Google Maps Android API v2","archived":false,"fork":false,"pushed_at":"2021-04-18T04:09:23.000Z","size":2365,"stargazers_count":572,"open_issues_count":5,"forks_count":175,"subscribers_count":34,"default_branch":"master","last_synced_at":"2025-05-24T23:12:19.038Z","etag":null,"topics":["android","android-library","java","kotlin"],"latest_commit_sha":null,"homepage":"","language":"Java","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/akexorcist.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-11-30T00:48:42.000Z","updated_at":"2025-04-05T18:51:30.000Z","dependencies_parsed_at":"2022-08-14T04:00:57.712Z","dependency_job_id":null,"html_url":"https://github.com/akexorcist/GoogleDirectionLibrary","commit_stats":null,"previous_names":["akexorcist/android-googledirectionlibrary"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/akexorcist/GoogleDirectionLibrary","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akexorcist%2FGoogleDirectionLibrary","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akexorcist%2FGoogleDirectionLibrary/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akexorcist%2FGoogleDirectionLibrary/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akexorcist%2FGoogleDirectionLibrary/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/akexorcist","download_url":"https://codeload.github.com/akexorcist/GoogleDirectionLibrary/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akexorcist%2FGoogleDirectionLibrary/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261249799,"owners_count":23130495,"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":["android","android-library","java","kotlin"],"created_at":"2024-11-21T18:09:04.402Z","updated_at":"2025-06-22T06:39:05.540Z","avatar_url":"https://github.com/akexorcist.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-Android--GoogleDirectionAndPlaceLibrary-brightgreen.svg?style=flat)](http://android-arsenal.com/details/1/1374)\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.akexorcist/google-direction-library/badge.svg)](https://search.maven.org/artifact/com.akexorcist/google-direction-library)\n![Minimum SDK Version](https://img.shields.io/badge/minSdkVersion-16-brightgreen) \n[![Workflow Status](https://github.com/akexorcist/GoogleDirectionLibrary/actions/workflows/android.yml/badge.svg)](https://github.com/akexorcist/GoogleDirectionLibrary/actions)\n\n# Android-GoogleDirectionLibrary\n![Google Direction Library](https://raw.githubusercontent.com/akexorcist/Android-GoogleDirectionLibrary/master/image/google-direction-library_header.jpg)\n\nGoogle Maps Direction API helper for Android\n\n![Google Direction Library](https://raw.githubusercontent.com/akexorcist/Android-GoogleDirectionLibrary/master/image/google-direction-library_01.jpg)\n\n![Google Direction Library](https://raw.githubusercontent.com/akexorcist/Android-GoogleDirectionLibrary/master/image/google-direction-library_02.jpg)\n\n\nDownload\n===============================\nSince version 2.1.2 will [move from JCenter to MavenCentral](https://developer.android.com/studio/build/jcenter-migration)\n```groovy\n// build.gradle (project)\nallprojects {\n    repositories {\n        mavenCentral()\n        /* ... */\n    }\n}\n```\n\n**Gradle**\n```\nimplementation 'com.akexorcist:google-direction-library:1.2.1'\n```\n\n\nSample Code\n===============================\n\nSimple Direction Request\n```kotlin\nGoogleDirection.withServerKey(\"YOUR_SERVER_API_KEY\")\n        .from(LatLng(37.7681994, -122.444538))\n        .to(LatLng(37.7749003,-122.4034934))\n        .avoid(AvoidType.FERRIES)\n        .avoid(AvoidType.HIGHWAYS)\n        .execute(\n            onDirectionSuccess = { direction: Direction? -\u003e \n                if(direction.isOK()) {\n                    // Do something\n                } else {\n                    // Do something\n                }\n            }, \n            onDirectionFailure = { t: Throwable -\u003e \n                // Do something\n            }\n        )\n```\n\n\nMultiple Waypoints Direction Request\n```kotlin\nGoogleDirection.withServerKey(\"YOUR_SERVER_API_KEY\")\n        .from(LatLng(41.8838111, -87.6657851))\n        .and(LatLng(41.8766061, -87.6556908))\n        .and(LatLng(41.8909056, -87.6467561))\n        .to(LatLng(41.9007082, -87.6488802))\n        .transportMode(TransportMode.DRIVING)\n        .execute(\n            onDirectionSuccess = { direction: Direction? -\u003e \n                if(direction.isOK()) {\n                    // Do something\n                } else {\n                    // Do something\n                }\n            }, \n            onDirectionFailure = { t: Throwable -\u003e \n                // Do something\n            }\n        )\n```\n\nor \n\n```kotlin\nval waypoints: List\u003cLatLng\u003e = listOf(\n        LatLng(41.8766061, -87.6556908), \n        LatLng(41.8909056, -87.6467561)\n)\nGoogleDirection.withServerKey(\"YOUR_SERVER_API_KEY\")\n        .from(LatLng(41.8838111, -87.6657851))\n        .and(waypoints)\n        .to(LatLng(41.9007082, -87.6488802))\n        .transportMode(TransportMode.DRIVING)\n        .execute(\n            onDirectionSuccess = { direction: Direction? -\u003e \n                if(direction.isOK()) {\n                    // Do something\n                } else {\n                    // Do something\n                }\n            }, \n            onDirectionFailure = { t: Throwable -\u003e \n                // Do something\n            }\n        )\n```\n\nSee example code for more detail\n\nTo get API key, please read [Get Google Maps Direction API Key](https://developers.google.com/maps/documentation/directions/get-api-key)\n\n\nDemo\n===============================\n\nTry it at [Google Play](https://play.google.com/store/apps/details?id=com.akexorcist.googledirection.sample)\n\n\nProGuard\n===========================\n```\n-keep class com.google.android.gms.maps.** { *; }\n-keep interface com.google.android.gms.maps.* { *; }\n\n-dontwarn retrofit2.**\n-keep class retrofit2.** { *; }\n-keepattributes Signature\n-keepattributes Exceptions\n\n-keepclasseswithmembers class * {\n    @retrofit2.http.* \u003cmethods\u003e;\n}\n\n-keep class com.akexorcist.googledirection.model.** { *;}\n```\n\n\nChange Log\n====\nSee [CHANGELOG.md](CHANGELOG.md)\n\n\nLicence\n===========================\nCopyright 2021 Akexorcist\n\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this work except in compliance with the License. You may obtain a copy of the License in the LICENSE file, or at:\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakexorcist%2Fgoogledirectionlibrary","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakexorcist%2Fgoogledirectionlibrary","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakexorcist%2Fgoogledirectionlibrary/lists"}