Android Question Enter an address and navigate to it

ThePuiu

Active Member
Licensed User
Longtime User
I need to integrate in an older B4A application the following mechanism: it reads from a database the address of an objective and the application must lead you to that place from the current position. What is the simplest and FREE method of doing this? Probably the number of daily queries is about 50.
 

DonManfred

Expert
Licensed User
Longtime User
What is the simplest and FREE method of doing this?
B4X:
Sub btnaddress_Click
    Log("Button btnaddress clicked")
    Dim mapIntent As Intent
    Dim geouri As String

    geouri = "google.navigation:q=" & labeladress.Text
    mapIntent.Initialize(mapIntent.ACTION_VIEW,geouri)
    mapIntent.WrapAsIntentChooser("Please choose App")
    StartActivity(mapIntent)
End Sub

labeladress must be set with the complete Address to navigate to.
For ex: Aachener Strasse 12, 52078 Aachen Germany

Check google Docs on the format.

This way you call the Google Navigation on the Device which then navigate you to the destination address.
 
Upvote 0

ThePuiu

Active Member
Licensed User
Longtime User
a perfect answer! as usual! From what I tested, the format of the address is adapted to each region separately ... for example, in Romania you can enter "the name of the city", "the name of the street" , "and the number"

Thank you!
 
Upvote 0
Top