Starting Google Navigation on Search Page

rbsoft

Active Member
Licensed User
Longtime User
I had seen that some had asked (including myself) how to start Google Navigation with the search page as intent, just like if you would call the application manually. Here is how it works.

B4X:
Sub StartGoogleNavi ()
   Dim mapIntent As Intent 
   Dim geoURI As String
   
   geoURI = ""
   mapIntent.Initialize(mapIntent.ACTION_VIEW,geoURI)
   mapIntent.SetComponent("com.google.android.apps.maps/com.google.android.maps.driveabout.app.DestinationActivity")
   StartActivity(mapIntent)
End Sub

You need to use the Phone Library.
Project is enclosed.

Rolf
 

Attachments

  • NavStart.zip
    6.4 KB · Views: 677
Top