osama-raddad
3/2/2016 - 4:09 PM

Android launchGoogleMaps

Android launchGoogleMaps

  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);
	}