Skip to content

Instantly share code, notes, and snippets.

@laaptu
Created August 1, 2014 04:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save laaptu/3ad031740deb99b9bd60 to your computer and use it in GitHub Desktop.
Save laaptu/3ad031740deb99b9bd60 to your computer and use it in GitHub Desktop.
Using intent to open maps for direction
//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