Skip to content

Instantly share code, notes, and snippets.

@KeithNdhlovu
Created July 7, 2016 12:37
Show Gist options
  • Save KeithNdhlovu/9a04edfd4f76fbc52460f6d29fa83be0 to your computer and use it in GitHub Desktop.
Save KeithNdhlovu/9a04edfd4f76fbc52460f6d29fa83be0 to your computer and use it in GitHub Desktop.
how to launch google maps directions API
Uri gmmIntentUri = Uri.parse(String.format(Locale.US, "google.navigation:q=%f,%f", panicLocation.latitude, panicLocation.longitude));
Intent mapIntent = new Intent(Intent.ACTION_VIEW, gmmIntentUri);
mapIntent.setPackage("com.google.android.apps.maps");
startActivity(mapIntent);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment