How we can read Google Maps turn by turn Navigation instructions? - android

I need to read the Turn by turn navigation data for my project . The direction api doesn't fulfil my requirement. Please suggest some way to read the data directly from Google Maps App.
I want to launch navigation in Google Maps app only , and then read it in my app.

Google Maps API Terms of Service have a restriction regarding route guidance. Particularly paragraph 10.4.c (iii) states
No navigation. You will not use the Service or Content for or in connection with (a) real-time navigation or route guidance; or (b) automatic or autonomous vehicle control.
Additionally, you have to pay attention to other restrictions that might be violated in your use case
Paragraph 10.1 a
No access to APIs or Content except through the Service. You will not access the Maps API(s) or the Content except through the Service. For example, you must not access map tiles or imagery through interfaces or channels (including undocumented Google interfaces) other than the Maps API(s).
Paragraph 10.5 d
No caching or storage. You will not pre-fetch, cache, index, or store any Content to be used outside the Service, except that you may store limited amounts of Content solely for the purpose of improving the performance of your Maps API Implementation due to network latency (and not for the purpose of preventing Google from accurately tracking usage), and only if such storage: is temporary (and in no event more than 30 calendar days);
is secure; does not manipulate or aggregate any part of the Content or Service; and does not modify attribution in any way.
https://developers.google.com/maps/terms#10-license-restrictions
So Google discourage the thing that you try to implement.

Related

How to get turn by turn or destination from google maps app?

How do apps such as
https://play.google.com/store/apps/details?id=com.headupnav.demo
get turn and destination info?
I want the user to use google maps app, and for my app to run in the background but know distance to the next turn, and where the final destination is.
Others do it, but I cannot understand how they are using the api (or which one)
https://developers.google.com/maps/documentation/api-picker
to accomplish the same task?
Please Advise
As far as Google Direction API goes, it is a breach of privacy policies to develop these sort of apps.
As per the documentation goes:
No navigation. You will not use the Service or Content for or in connection with (a) real-time navigation or route guidance; or (b) automatic or autonomous vehicle control.
Also Google does not provide any sort of open source API for developers to build turn by turn navigation. The app developers might have designed there own navigation system which is not coming out well as far as the reviews goes.

How to use google map tiles in my android app for offline use

I am developing an Android app that show the user's location in Google Maps API 2. Now I want it so that the user can download a custom area or custom city map for offline use of the map. How can I implement this? I also use OSMDroid, but it is not loading the map, even online.
Read the terms of use:
(b) No Pre-Fetching, Caching, or Storage of Content. You must not
pre-fetch, cache, or store any Content, except that you may store: (i)
limited amounts of Content for the purpose of improving the
performance of your Maps API Implementation if you do so temporarily
(and in no event for more than 30 calendar days), securely, and in a
manner that does not permit use of the Content outside of the Service;
and (ii) any content identifier or key that the Maps APIs
Documentation specifically permits you to store. For example, you must
not use the Content to create an independent database of "places" or
other local listings information.

Geocoding results without displaying them on a map

I am devoloping an app that let the user know its location. I am using this example
But I also seen here that "The Geocoding API may only be used in conjunction with a Google map; geocoding results without displaying them on a map is prohibited". So I cannot use Geocoder without displaying the result on the map?
Geocoder, the class that you use which, for Android is under the package:android.location.Geocoder.
That is different from Google Geocoding API:
https://developers.google.com/maps/documentation/geocoding/?hl=fr
for which we'd use the url:
http://maps.googleapis.com/maps/api/geocode/output?parameters
There is a GeoCoder class for javascript which is related to the Google Geocoding API which is the Geocoder class of the Google Maps API v3.
(searching for which takes us to: https://developers.google.com/maps/documentation/javascript/services?hl=fr#Geocoding)
So when there is reference to "The Geocoding API may only be used in conjunction with a Google map; geocoding results without displaying them on a map is prohibited."
It would be for the API and related class of the v3 API, not the android.location.Geocoder.
Also, i would like you to know about:
https://code.google.com/p/android/issues/detail?id=8816
I have faced that one.
Actually, you can use Geocoding API, there is no limit. See my last answer
Get current location using json
TLDR: You should be fine.
The content that you are referencing is indeed for Google's REST API's and states:
The Geocoding API may only be used in conjunction with a Google map; geocoding results without displaying them on a map is prohibited. For complete details on allowed usage, consult the Maps API Terms of Service License Restrictions.
This will not affect the use of the Android as far as I am aware. Referencing this answer it seems that:
Therefore there is no hard limit on the the Android GeoCode API useage, more just a fair useage policy per device (client)
From the TOS:
(a) Free Access (No Fees). Your Maps API Implementation must be generally accessible to users without charge and must not require a fee-based subscription or other fee-based restricted access. This rule applies to Your Content and any other content in your Maps API Implementation, whether Your Content or the other content is in existence now or is added later.
However:
(b) Mobile Applications.
(i) The rule in Section 9.1.1(a) (Free Access) does not apply if your Maps API Implementation is used in a mobile application that is sold for a fee through an online store and is downloadable to a mobile device that can access the online store.
(ii) The rule in Section 9.1.1(b) (Public Access) does not apply if
your Maps API Implementation is an Android application that uses the
Google Maps Android API. (However, the rule in Section 9.1.1(b)
(Public Access) will continue to apply if your Maps API Implementation
is an Android application that uses any other Maps APIs, unless the
Maps API Implementation qualifies for the exception in Section
9.1.2(a) (Enterprise Agreement with Google).)
I've always found the TOS a bit difficult to grasp myself and have ended up contacting Google. While they've always been perfectly amicable it has sometimes taken some time for a response. I hope this helps clear this up for you and anyone else that comes across it.
You can use the Android Geocoder without needing to display the results on the map.
The geocoding service for Android is abstracted from any particular server-side implementation and is dependent on the OEM implementing this feature in the device. In the above documentation, it says:
The Geocoder class requires a backend service that is not included in the core android framework. The Geocoder query methods will return an empty list if there no backend service in the platform. Use the isPresent() method to determine whether a Geocoder implementation exists.
In other words, the Android Open-Source Project includes only a proxy class for the Geocoder service, a base abstract GeocoderProvider to be implemented, and an an interface for location providers implementing the Geocoder services - not the actual Geocoder service implementation.
So, when your app is running on a device, it may be accessing any number of geocoding providers when using the Android Geocoder API, depending on how that particular OEM implemented the service on that particular device. Google may have an agreement with some OEMs to provide these services via their own web-based Geocoding API, but this agreement does not involve you as a developer and would not force the web-based Geocoding API Terms of Service on you (since you have no way of knowing whether or not your app is actually using a Google service).

Google distance matrix web service limit

According to this Google document there are limits on using Distance matrix web service.
From the document :
Use of the Distance Matrix API must relate to the display of information on a
Google Map.Use of the service in an application that doesn't display a Google map
is prohibited.
I am not clear whether I meet this limit or not.
Let me explain how I use this web service. I call this api from server to get distance between locations. Using this distance I just decide that user1's entered location is near to user2's entered location or not. I don't use this information to display on google map. But at client side I display google maps with marker for user's entered location and markers for nearby users' location.
Using web service and google maps this way, do I satisfy the above mentioned limit?
Note : I also call direction web service at client-side to display routes on map.
MAPS API
Your usage is fine. I think the whole point of the Google guidelines you quoted above are to stop people using the distance matrix and other Google Maps APIs (without a Google MAPS API business account) from using it outside of any "app" scope for financial gain or in situations where there is a simpler solution that doesn't require their API. (I will get to this soon)
This is also the reason they impose lower limits on the numbers of API calls you can make per day when using a free Google Maps key:
Normal - 2 500 elements per 24 hour period.
Business - 100 000 elements per 24 hour period.
I've used many of the Google maps API services on free accounts across a broad range of applications, some that match the scenario you have state above, others that do not. We have never had a problem at all and as long as people use the API fairly, they shouldn't either.
Other ways
There are other ways of doing what you require. You could calculate the distance between the two locations using the Haversine Foruma
http://en.wikipedia.org/wiki/Haversine_formula
and then send this distance down to your app upon request. This would remove the need for the Distance Matrix API in some circumstances (I'm unsure how indepth your App and Web Services actually are).
Why not instead use straight line distance between two points?
Try to find something similar to Android's Location.distanceBetween in the language you use for your server or just port the code from Android.

Pre-caching of maps with google map android API v2

I need to do map pre-cache of any zone previously chosen in my app. Is it possible to do this with google map android API v2? How?
Thanks.
What I've found is the google map seems to be cached automatically on android. Have you even tried to see what the response time is on a zone that was previously visited in your application?
Anywho,
It's against the terms of service to cache the google map for most situations. It's against the terms of service of course to reverse-engineer. You have to call the service via the api so I don't see how you can pre-cache the "MAP" legally.
See section 10.1.3 subsection (b) https://developers.google.com/maps/terms
10.1.3 Restrictions against Data Export or Copying.
...
(b) No Pre-Fetching, Caching, or Storage of Content. You must not pre-fetch, cache, or store any Content, except that you may store: (i) limited amounts of Content for the purpose of improving the performance of your Maps API Implementation if you do so temporarily (and in no event for more than 30 calendar days), securely, and in a manner that does not permit use of the Content outside of the Service; and (ii) any content identifier or key that the Maps APIs Documentation specifically permits you to store. For example, you must not use the Content to create an independent database of "places" or other local listings information.

Categories

Resources