0

I'm working with an android wrapped app (using web viewer), and I would like to ask the user which app wants to use when pressing in address from my app.

Example pop-up in android (Spanish): https://puu.sh/EEXBK/388b01494d.png

I have tried using the google API launcher which is: https://www.google.com/maps/dir/?api=1&origin=xxx&destination=xxx&travelmode=driving But this opens directly maps, without asking if you want to use Waze or not.

It is possible with Javascript?

My targets are Maps and Waze. Any suggestions? Thanks.

2 Answers2

0

check this document for opening waze and for google map check this

you can create url for each one


example waze:

https://www.waze.com/ul?ll=40.75889500%2C-73.98513100&navigate=yes&zoom=17


example google maps:

https://www.google.com/maps/@?api=1&map_action=map&center=-33.712206,150.311941&zoom=12&basemap=terrain

Alireza Sharifi
  • 1,127
  • 1
  • 9
  • 18
0

You can use these URLs:

   appleURL = "http://maps.apple.com/?daddr=\(latitude),\(longitude)"
   googleURL = "comgooglemaps://?daddr=\(latitude),\(longitude)&directionsmode=driving"
   wazeURL = "waze://?ll=\(latitude),\(longitude)&navigate=false"

For more see this link

M Karimi
  • 1,991
  • 1
  • 17
  • 34