open google maps cycling navigation intent code example
Example 1: open google maps cycling navigation intent
Uri gmmIntentUri = Uri.parse("google.navigation:q=Taronga+Zoo,+Sydney+Australia");
Intent mapIntent = new Intent(Intent.ACTION_VIEW, gmmIntentUri);mapIntent.setPackage("com.google.android.apps.maps");
startActivity(mapIntent);
Example 2: open google maps cycling navigation
var gmmIntentUri = Uri.parse("google.navigation:q="+destintationLatitude+","+destintationLongitude + "&mode=b");
var mapIntent = Intent(Intent.ACTION_VIEW, gmmIntentUri);
mapIntent.setPackage("com.google.android.apps.maps");
startActivity(mapIntent);