-
-
Save osama-raddad/6ac763b04718e930f1c8 to your computer and use it in GitHub Desktop.
Android launchGoogleMaps
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
private void launchGoogleMaps(String name, String vicinity) { | |
Intent intent = new Intent(android.content.Intent.ACTION_VIEW, | |
Uri.parse("http://maps.google.com/maps?q="+name+","+vicinity)); | |
intent.setClassName("com.google.android.apps.maps", "com.google.android.maps.MapsActivity"); // this is the magic | |
startActivity(intent); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment