Created
August 1, 2014 04:21
-
-
Save laaptu/3ad031740deb99b9bd60 to your computer and use it in GitHub Desktop.
Using intent to open maps for direction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//http://stackoverflow.com/questions/2662531/launching-google-maps-directions-via-an-intent-on-android | |
Intent intent = new Intent(android.content.Intent.ACTION_VIEW, | |
Uri.parse("http://maps.google.com/maps?saddr="+latitude_source+","+longitude_source+"&daddr="+latitude_dest+","+longitude_dest)); | |
startActivity(intent); | |
Intent intent = new Intent(android.content.Intent.ACTION_VIEW, | |
Uri.parse("google.navigation:q=an+address+city")); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment