-2

Take Uber as an example. How can I get that real-time navigation functionality?

Thoughts

  1. Get list of latitude/longitude waypoints from WayPoints API: https://developers.google.com/maps/documentation/directions/intro#Waypoints

  2. Use the coordinates from step #1 to draw a polyline: https://developers.google.com/maps/documentation/android-api/shapes#code_samples

However, this would be essentially re-implementing the GoogleMaps app. I would have to adjust the polyline if the user left the path, etc.

Is it possible to just embed real-time directions?

  • 2
    You may wish to review the terms of service for Google Maps, to see if what you want to do falls within those terms. – CommonsWare Apr 30 '16 at 23:17
  • My desired functionality is implemented by at least Uber. Perhaps Uber has a separate TOS agreement with Google, however. – another_user10293412 Apr 30 '16 at 23:19
  • 1
    I agree with CommonsWare, see http://stackoverflow.com/a/26231295/1282637 – user1282637 May 01 '16 at 01:42
  • 1
    Possible duplicate of [Is it possible to create turn-by-turn GPS navigation app on Android using Google Maps?](https://stackoverflow.com/questions/24531391/is-it-possible-to-create-turn-by-turn-gps-navigation-app-on-android-using-google) – Clint Jul 19 '18 at 15:00

1 Answers1

1

As far as my Experience goes, you can only embed products that support embeding. I don't think google map does. But check this out: how to embed Turn by turn navigation on my google.

You could go for the OpenSource Navigation Software. Copy their code and make the necessary changes to fit your needs.

Turn their Activities into Fragments, the Fragments you can embed in your Views.

It will not be the easiest but easier than implementing a full featured Navigation Software.

Your other option is to find a Navigation Software that can be embeded.

Community
  • 1
  • 1
Valitos
  • 36
  • 3