Google-Directions-Android | project allows you to calculate the route | Map library
kandi X-RAY | Google-Directions-Android Summary
kandi X-RAY | Google-Directions-Android Summary
This project allows you to calculate the direction between two locations and display the route on a Google Map using the Google Directions API - This project isn’t actively been maintained.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Initializes the activity .
- Parse the response
- Constructs the full URL to use for routing .
- Get the autocomplete results from the Google Analytics API .
- Handle success route
- Decode polyline .
- Writes the Parcel instance .
- Returns a filter that filters the data set .
- Find polyline options .
- This method executes the Google App API request .
Google-Directions-Android Key Features
Google-Directions-Android Examples and Code Snippets
Community Discussions
Trending Discussions on Google-Directions-Android
QUESTION
I am new to Android and working on a google map project. For this I am using this library to draw a route between two points.
This works fine when there is no restriction on the google map api key. But when restriction is applied to my app's package name and sha1 key it won't show the route.
It throws an exception saying:
This IP, site or mobile application is not authorized to use this API key. Request received from IP address XX.XX.XXX.XXX, with empty referrer
Is there any way to use this library with a restricted api key? How can I add a referrer with this library?
...ANSWER
Answered 2020-Mar-22 at 14:41It looks like this library uses the Directions API web service, so you cannot use an Android-restricted API key. If you do, you get the request_denied error you're reporting. This is because web services are server-side and the API key can only be restricted by IP address.
Having said that, you are calling the API from an Android app. Google's documentation states:
IP restrictions might be impractical, such as in mobile applications and cloud environments that rely on dynamic IP addresses. When using Maps Web Service APIs in these scenarios, secure your apps using one or more of the following techniques:
pinning, proxy server, obfuscation
Hence, setting up a proxy server may be the best way to properly secure your API key.
Hope this clarifies your question.
QUESTION
I am using the Google-Directions-Android Library (while following this example).
I have followed the example above and no route was drawn on the map for me - no errors were thrown either and I don't know what I did wrong.
My map code (the code that is part of the example is mostly below"onRoutingCancelled" - at the bottom part.):
...ANSWER
Answered 2019-Mar-01 at 13:24In the end, I solved it by adding the server key from google API console, in order to use google direction you must enter proper key.
QUESTION
I'm building an app using Google-Directions-Android (https://github.com/jd-alexander/Google-Directions-Android). I'm using the API Key in the same App for maps without problems, but when I try to use the following
...ANSWER
Answered 2019-Jan-10 at 14:28To use google direction library you will have to use your server key(auto generate for you bu google). You can find the server key inside your console
Try replace this code :
QUESTION
I am currently developing an application in which i want to know if a route contains a certain set of lat long coordinates. Here is my code:
...ANSWER
Answered 2018-May-26 at 21:19Take a look at PolyUtil.isLocationOnPath(LatLng point, java.util.List polyline, boolean geodesic, double tolerance)
method of Google Maps Android API Utility Library. You need to get polyline path from A to D and check each point from list (B and C) with isLocationOnPath()
if it laying on A-D path. Something like that:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install Google-Directions-Android
You can use Google-Directions-Android like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the Google-Directions-Android component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page