'How to show select-app dialog through Javascript?

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.



Solution 1:[1]

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

Solution 2:[2]

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

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 lvl4fi4
Solution 2 M Karimi