I'm creating a tour app with Firebase as a backend. I need to know how to intent aparticular location with marker on it?
Intent i = new Intent (Intent.ACION_VIEW)
like this, or is there any other method to do with marker on it ?
Try this sample for launching google maps with specific Lat & Lng
public void gotToLocation(String markerName,Float latitude, Float longitude ) {
String uri = String.format(Locale.ENGLISH, "geo:0,0?q=%f,%f(%s)", latitude,longitude,markerName);
Intent mapIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(uri));;
mapIntent.setPackage("com.google.android.apps.maps");
if (mapIntent.resolveActivity(getActivity().getPackageManager()) != null) {
startActivity(mapIntent);
}
}
then call it like this
gotToLocation("MyLocation",34.99,-106.61);
Thanks bro, I'll try this one and tell you