67

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

Mehul Thakkar
  • 12,440
  • 10
  • 52
  • 81
mz87
  • 1,398
  • 2
  • 13
  • 13
  • 6
    I have worked on creating a custom navigation application, and there is far more to it than most people might think off the bat. You should look into fused location providers, and look into understanding how the Google Maps and Google Directions API work. The issue isn't really in getting the directions and the route, but tracking your coordinates versus the route(s). – zgc7009 Jul 02 '14 at 21:27
  • 1
    Do you mean problems with GPS receiver on the device and accuracy? – mz87 Jul 03 '14 at 07:37
  • 4
    That is just a piece of the puzzle. All you have are your coordinates and your route. It is your responsibility to handle everything else. Navigation markers, predicting movement, determining appropriate GPS ping intervals... It gets to be a bit bulky(which is why you don't see a lot of complete third party navigation apps. – zgc7009 Jul 03 '14 at 11:17

7 Answers7

84

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.

Community
  • 1
  • 1
Tushar
  • 1,006
  • 1
  • 7
  • 7
  • None at the moment but I did stop looking myself. – Tushar Mar 26 '15 at 14:17
  • 3
    @Nima I've looked at this too and a couple of alternatives where the one from Skobbler looks most interesting. You are able to download their SDK from http://developer.skobbler.com/support#download and it includes an entire demo project with a turn-by-turn direction example. – Peter Theill Sep 01 '15 at 09:13
  • Such a cute answer, really its blown my mind.. Ha ha haa – DJphy Dec 10 '15 at 20:59
  • 3
    One of the best alternative for this that i have found with nice documentaton is Nokia's HERE maps, they are bit costly for use but if you look towards developer friendliness.. then you should surely go for it. They are providing control over each end every map related task. So I suggest you to go for that. Only Cost matters here – Mehul Thakkar Mar 18 '16 at 07:46
  • Is there any kind of paid plan of Google which supports turn-by-turn navigation that is usable in an Android app? – scaryguy Sep 22 '16 at 06:17
  • Ask for permission vs beg for forgiveness? ;) – Joshua Pinter Nov 15 '16 at 22:04
  • 3
    How is Uber doing it then ? – Utsav Gupta Nov 21 '16 at 16:24
  • I don't need navigation! I need to get rest of current way length. Is it posible to get value with rest of current way from already running Navigation App (not only google)? – Dmitry Lyalin Feb 19 '17 at 09:47
  • 1
    Uber is doing this because uber is paying Million $$s to the google map service – Ram Mandal Sep 26 '17 at 10:59
  • @RamMandal Yeah that's what I don't get though. If I make a navigation app using their API, I would still have to pay them based on the amount of AP usage within the app, so why do they care what I make with it? – still_dreaming_1 Feb 25 '18 at 00:40
  • I hate all these legal gotchas. Even their navigation API is under the same terms of service. So they are offering a navigation API that you are not allowed to use for navigation? If we are paying for a premium account they should allow us to make competing products with it. Next they will add a clause that you are not allowed to use their maps API for mapping purposes. – still_dreaming_1 Feb 25 '18 at 01:20
  • 1
    @MehulThakkar The HERE maps have the same developer restriction in their terms of service. The Skobbler SDK mentioned by another user seems to specifically allow/encourage the creation of turn by turn navigation apps, but as of right now they are currently not allowing new developers to register while they are working on a new API. – still_dreaming_1 Feb 25 '18 at 02:47
  • 1
    Here is the link for the HERE maps developer terms and conditions: https://developer.here.com/terms-and-conditions In section 7 they refer to these types of apps as "Route Guidance applications", and say they are not allowed. – still_dreaming_1 Feb 25 '18 at 02:54
  • @still_dreaming_1 Because, google is dominating the market for android navigation. Why would they allow customers to create competing products with their service? – Clint Jul 19 '18 at 14:42
  • @Clint Yes that makes sense. If you believe that the entire purpose of these APIs is to create confusion and trick people into believing they can use them for these purposes and then sue them later so they never finish making a competing product using some other tool. My point is it feels like they are providing routing and mapping APIs for developers to use, but they are not actually allowed to use them for routing and mapping purposes. – still_dreaming_1 Jul 19 '18 at 16:46
  • @Clint We can able to use above answer second option with android app itself. But in iOS app also we can use navigation things also. As per my project having customer & driver app, In driver app while using navigation app code with iOS also mean time for our driver app will goes background mode itself. In that same case we need to updating driver gps coordinates to server to give tracking in customer app also. While iOS app in background mode how we will update these coordinates to server when using google navigation app for directions purpose? – sankar muniyappa Aug 23 '18 at 07:56
  • An open source alternative is this server component: https://github.com/graphhopper/graphhopper-navigation combined with this Android client https://github.com/graphhopper/graphhopper-navigation-example – Karussell Oct 19 '18 at 12:43
  • 1
    IANAL Apparently the TOS changed: See 3.2.4 (c) Restrictions Against Misusing the Services cloud.google.com/maps-platform/terms – lilalinux Mar 29 '19 at 08:16
35

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.

E J Chathuranga
  • 927
  • 12
  • 27
DrkStr
  • 1,752
  • 5
  • 38
  • 90
  • 4
    OK, but does that Google Directions API include turn-by-turn navigation? Like GoogleMaps application with voice and arrow images (left right U-turn etc.) ? – mz87 Jul 03 '14 at 07:40
  • 3
    No, all it gives you are a long list of LatLng way-points to your destination. You will have the design the voice and arrows and stuff your self. You will have to plot the way-points on a the map your self as well. Hence the suggestion to use the second option. Give it a try, the result is very similar to what you are looking for. – DrkStr Jul 03 '14 at 12:39
  • 1
    @mz87: Try nokia's Here maps, they provide each and everything that you are looking for – Mehul Thakkar Mar 18 '16 at 07:48
  • 3
    Im in a similar situation and Google Maps APIs Terms of Service section 10.4 c iii it says - "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." I suspect option 2 should be the only legal answer, since youre using the devices built in navigation, and its not 'really' your app. Not completely sure my interpretation is correct, though. – aiguy Feb 06 '17 at 23:40
  • Technically you are not using Google Maps for Navigation or route guidance. All you are doing is marking a location (the destination) on Google Maps, not really your fault the users decided to use the navigation feature. What do you think @tushar ? – DrkStr Feb 07 '17 at 22:41
  • 1
    Ok I tried second option, it is also a better way to handle navigation. Good way. Thanks – ashishdhiman2007 Nov 18 '17 at 11:04
  • 1
    IANAL Adding to the "legal" comment, apparently that changed: See 3.2.4 (c) Restrictions Against Misusing the Services https://cloud.google.com/maps-platform/terms – lilalinux Mar 29 '19 at 08:15
25

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.

sschuberth
  • 28,386
  • 6
  • 101
  • 146
Mehul Thakkar
  • 12,440
  • 10
  • 52
  • 81
  • The HERE maps terms of service do not allow developers to make turn by turn, live navigation apps. In section 7 they refer to these as "Route Guidance applications": https://developer.here.com/terms-and-conditions – still_dreaming_1 Feb 25 '18 at 02:52
  • 2
    @still_dreaming_1 : please read it again, the first line in section 7 specifies that, "Applications shall not include any other use cases or uses than those that are specifically allowed in your subscription plan", if you have not takes subscription of it, then it applies for you. but after taking subscription plan, you can use it. – Mehul Thakkar Feb 26 '18 at 09:24
  • @still_dreaming_1: I already mentioned in my answer that - it is costly - and allow free usage only for development for 90 days only. – Mehul Thakkar Feb 26 '18 at 09:28
  • Even when looking at what plans they offer, it makes it seem there is no standard plan that offers turn by turn directions, that feature is only offered for "custom plans". Perhaps if I were to try to pay for a plan, I would then see a list of other "custom plans" available, but that seems unlikely given that they already show several different paid plans before that. It seems you have to custom negotiate that type of plan and use case with them, or at least that is how they make it seem. I imagine that would be even more expensive than the paid plans they show you. – still_dreaming_1 Mar 01 '18 at 04:50
  • You can see that only under the "contact us" plans, are the advanced features offered, and it doesn't show a price. So you would have to negotiate the plan and price with them. – still_dreaming_1 Mar 01 '18 at 04:53
  • Recently, HERE Maps updated their pricing plans for developers. https://developer.here.com/plans – Yasir Tahir Oct 09 '18 at 08:19
20

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!

RoelandP
  • 253
  • 3
  • 7
  • 1
    For an Android solution have a look here: https://github.com/graphhopper/graphhopper-navigation-example – Karussell Oct 19 '18 at 12:43
7

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.3 (emphasis mine):

(d) 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) use the Google Maps Core Services to 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.

Clint
  • 2,696
  • 23
  • 42
1

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.

amit semwal
  • 345
  • 3
  • 16
0

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

Ted
  • 22,696
  • 11
  • 95
  • 109