Search code examples
javaandroidgoogle-mapsgoogle-distancematrix-api

How to configure Google Maps Distance Matrix API for Android (java)


I am developing an Android app(java) that can calculate the travel distance of two places given their coordinates. I have a Google Distance Matrix API key with me but I was unable to find a proper way to add the dependency in my Android project. How can I solve this problem?


Solution

  • The best method is to develop a REST API and call Distance Matrix API and transfer the decoded JSON object to app as a String.