I want to show a chooser dialog and users will choose any map app in their device. After choosing, app will automatically find device location and show route to given location(as latitude and longitude).
For Google Maps, this code makes what I need without showing chooser dialog,
Intent intent = new Intent(Intent.ACTION_VIEW,
Uri.parse("http://maps.google.com/maps?f=d&daddr=" + location));
intent.setComponent(new ComponentName("com.google.android.apps.maps",
"com.google.android.maps.MapsActivity"));
startActivity(intent);
But for Yandex, I can only show given location on map like below,
Intent intent;
intent = new Intent(Intent.ACTION_VIEW, Uri.parse("geo:" + location+ "?q=" + latAndLong));
startActivity(Intent.createChooser(intent, "Select an app"));
Is there any way to make that for all map applications or for only Google Maps and Yandex?