My app needs to show Google Maps directions from A to B, but I don\'t want to put the Google Maps into my application - instead, I want to launch it using an Intent. Is this
Google DirectionsView
with source location as a current location and destination location as given as a string
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://maps.google.com/maps?f=d&daddr="+destinationCityName));
intent.setComponent(new ComponentName("com.google.android.apps.maps", "com.google.android.maps.MapsActivity"));
if (intent.resolveActivity(getPackageManager()) != null) {
startActivity(intent);
}
In the above destinationCityName
is a string varaiable modified it as required.