We can open Google Maps app using intent:
val gmmIntentUri = Uri.parse("google.navigation:q="+destintationLatitude+","+destintationLongitude + "&mode=b")
val mapIntent = Intent(Intent.ACTION_VIEW, gmmIntentUri)
mapIntent.setPackage("com.google.android.apps.maps")
startActivity(mapIntent)
Here, "mode=b" is for bicycle.
We can set driving, walking, and bicycling mode by using:
- d for driving
- w for walking
- b for bicycling