Oct 15, 2023

Google Direction Api In Android

direction api google direction api route draw on google map android google map api map sdk

This is an android library which provides you a direction path between two points (locations) such as device location to destination location. To use this library, you need to create a project on Goolge Cloud Console and enabble the Map SDK along with Google Direction Api.

Implementation Process :

Add jitpack repository in your settings.gradle (project-level) file :

dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        maven { url "https://jitpack.io" }
    }
}

Add dependency in your build.gradle (module-level) file :

dependencies {
      implementation 'com.github.dangiashish:Google-Direction-Api:1.6'
}

 

For more details, kindly visit the documentation part of this library.

 

4

Give a star to encourage!Discussion
Start a new conversation!
Login to join the discussion