Redirect user to Google Maps Android application to show a direction
Asked Answered
A

1

6

I am working in an android application and I have two Geo points. I want the user to redirect to the google map android application from my application to show the directions in the map. How can I pass the two geopoints to google map android application to show the direction in the google map application.

Abet answered 23/9, 2014 at 5:27 Comment(2)
This has been already answered =) #6206327Calla
Thanks for the response, but the given link shows only a location in the google map. I want to show a direction.Abet
B
13

Here's an example showing directions in the Google Maps app using an intent.

From the linked answer:

Intent intent = new Intent(android.content.Intent.ACTION_VIEW, 
Uri.parse("http://maps.google.com/maps?saddr=20.344,34.34&daddr=20.5666,45.345"));
startActivity(intent);
Biller answered 23/9, 2014 at 5:59 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.