Android Question Show route button on google maps

DonManfred

Expert
Licensed User
Longtime User
If you click on a marker then buttons appear on the Google Map (bottom right). Clicking on this button opens the Native GoogleMaps app to navigate to the Location.
 
Upvote 0

Gktech

Member
Licensed User
If you click on a marker then buttons appear on the Google Map (bottom right). Clicking on this button opens the Native GoogleMaps app to navigate to the Location.

What did you mean, wanted to know if it's possible to load by default without having to click?
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
You can send the intent yourself. For example:
B4X:
Sub MapFragment1_Click (Point As LatLng)
   Dim in As Intent
   in.Initialize(in.ACTION_VIEW, $"google.navigation:q=${Point.Latitude},${Point.Longitude}"$)
   in.SetPackage("com.google.android.apps.maps") 'this method is only available in v8.8+. Example of calling it with JavaObject: https://www.b4x.com/android/forum/threads/inline-java-question.97866/#post-616946
   StartActivity(in)
End Sub
 
Upvote 0
Top