I want to call google map intent without showing "Complete Action Dialog"?
Is it possible? Here is my code.
String uri = "http://maps.google.com/maps?saddr=" + Utils.getLatitude(ShowDetails.this)+","+Utils.getLongitude(ShowDetails.this)+"&daddr="+userLatitude+","+userLongitude;
startActivity(new Intent(android.content.Intent.ACTION_DEFAULT, Uri.parse(uri)));
I dont want to show below dialog when calling google map intent . Any Help is appreciated .
Below code helps me to solve my question.
String uri = "http://maps.google.com/maps?saddr=" + Utils.getLatitude(ShowDetails.this)+","+Utils.getLongitude(ShowDetails.this)+"&daddr="+userLatitude+","+userLongitude;
Intent intent = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse(uri));
intent.setClassName("com.google.android.apps.maps", "com.google.android.maps.MapsActivity");
startActivity(intent);
Use the Google Maps URI rather than "http://[...] "
It goes something like this:
String uri = "geo:" + latitude + "," + longitude
Check out http://developer.android.com/guide/appendix/g-app-intents.html for the info.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With