Is it possible to create turn-by-turn GPS navigation app on Android/iOS using Google Maps?

AndroidIosGoogle MapsNavigationGps

Android Problem Overview


Today I've talked to a client and he wants to build a simple navigation APP on Android!

Basically we could use Google maps, place some of "our" markers to show some locations (restaurants, hotels etc.) .. also we need to show user's friends near by!

Everything of that is possible in Google Maps API on Android, except I can not find any useful information about Turn-by-turn navigation implementation inside my own app (without switching to Google Maps App) ..

Can someone simply clarify - is it possible to use Google Maps inside an Android app to create turn-by-turn GPS based app?

thanks

Android Solutions


Solution 1 - Android

I agree with the answer stated above but there is also a key clause in section 10.4.c of the google maps API privacy terms here.

It 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.

Therefore I'd like to proceed and answer your question and say No, it is not possible to create a turn-by-turn navigation application on android by using Google Maps API without breaching their privacy policy.

Solution 2 - Android

Edit: Read answer by Tushar below before using this answer

First Option

If you want to implement the navigation completely in your app you will have to use a combination of the Google Maps API and the Google Directions API. They are free to use up to a limit and then you have to pay for the api requests.(https://developers.google.com/maps/documentation/directions/)

Second Option

I would just send the latitude and longitude of the location you want to navigate to the devices Maps app. Here is some code to start you off with this method:

double lat = < latitude of the location you want to navigate to>

double lng = < longitude of the location you want to navigate to>     

String format = "geo:0,0?q=" + lat + "," + lng + "( Location title)";
		
Uri uri = Uri.parse(format); 
		
		
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);

This will open the device's Maps app and plot the location and the user can use the app to do what ever they want.

I would go with the Second Option, it is stupidly easy to implement.

Solution 3 - Android

After searching a lot, I have found two options for turn-by-turn navigation with voice instructions and arrow images.

  1. skobbler or sk maps (http://developer.skobbler.com/)
  2. HERE Maps (https://developer.here.com/)

HERE Maps is somewhat costly and does not allow free usage (only 90 days of trial period). But it has lots of advantages like:

  1. Clear and perfect documentation: The documentation they provide is clear and easily understandable, also the demo app they provide has all the required things implemented. So you can copy-and-paste many things.

  2. Developer friendly: Full control of maps for developers (no restrictions, you can do anything that you can think of with maps).

  3. Coverage: Navigation is not only clear and good for some specific countries, but for almost all countries. I have checked it in India for example. Apple Maps is not providing routes in India, Google Maps are providing it, but from my perspective, HERE Maps is much clearer and even better than Google.

skobbler is good and allows free usage up to a limit, but it's not good for all countries (not covering India up to level). Also it is not that much developer friendly as HERE Maps.

Solution 4 - Android

I stumbled upon this thread by searching for a turn-by-turn solution myself and I searched a bit further and found this promising javascript project:

FFWDme.js - is a JavaScript toolkit that aims to bring interactive GPS driving directions to the mobile browser

It's open source. It's configurable, but by default it uses leaflet.js for slippy maps, and configurable Tile-server, so you could run it off Open-street maps. It also uses an opensource Graphhopper for direction services, but you can add your own.

Looks promising!

Solution 5 - Android

Creating turn by turn navigation using Google Maps API is not allowed in the Google Maps API ToS, even after the July 2018 pricing change where they updated their ToS.

From Google Maps new ToS section 3.2.4 (emphasis mine):

> (c) No Re-Creating Google Products or Features. Customer will not use > the Services to create a product or service with features that are > substantially similar to or that re-create the features of another > Google product or service. Customer’s product or service must contain > substantial, independent value and features beyond the Google products > or services. For example, Customer will not: (i) re-distribute the > Google Maps Core Services or pass them off as if they were Customer’s > services; (ii) create a substitute of the Google Maps Core Services, > Google Maps, or Google Maps mobile apps, or their features; (iii) use > the Google Maps Core Services in a listings or directory service or to > create or augment an advertising product; (iv) combine data from the > Directions API, Geolocation API, and Maps SDK for Android to create > real-time navigation functionality substantially similar to the > functionality provided by the Google Maps for Android mobile app.

Solution 6 - Android

I am late here but it would help someone, I found something on this context. Google providing In-app Navigation and Google Maps turn-by-turn directions support. It's paid, you can check more about this on below link.

https://cloud.google.com/maps-platform/rides-and-deliveries

Not sure if it solve your problem or not.

Solution 7 - Android

Not yet possible but google has some private partnerships

Lyft introduced google maps navigation in-app https://www.theverge.com/2017/10/12/16465414/lyft-google-maps-waze-navigation-app-drivers

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questionmz87View Question on Stackoverflow
Solution 1 - AndroidTusharView Answer on Stackoverflow
Solution 2 - AndroidDrkStrView Answer on Stackoverflow
Solution 3 - AndroidMehul ThakkarView Answer on Stackoverflow
Solution 4 - AndroidRoelandPView Answer on Stackoverflow
Solution 5 - AndroidClintView Answer on Stackoverflow
Solution 6 - Androidamit semwalView Answer on Stackoverflow
Solution 7 - AndroidTedView Answer on Stackoverflow