Good day,
I am trying to use Google maps to navigate my app user to a certain address / location. From what I have found on the net so far I have tried the following:
Intent intent = new Intent(android.content.Intent.ACTION_VIEW,
Uri.parse("http://maps.google.com/maps?saddr=-36.181,27.949&daddr=-36.174732,27.949770"));
startActivity(intent);
Now this is all good and well it opens up Google maps, but it ask me a jolly lot of things before I can actually get to the navigation.
- 1: It fist asks me to select a trip
- 2: It then shows me the trip
- 3: I then have to click the little arrow head (Navigate Button)
Then only does it begin Navigation.
Is there not a way for me to specify in my intent to use the first route and to just start navigating immediately/automatically?
On a second note, Once I have reached my destination or I want to go back/cancel, the back button needs to take me back to my application, right now it then goes back to showing me the route, then I click back again and it says are you sure you want to exit navigation.
Or can I maybe listen for an Intent that Maps publishes once you have reached the destination. So as The user gets to the destination my application will come into focus again?