dpa99c / phonegap-launch-navigator

Phonegap/Cordova plugin which launches native route navigation apps for Android, iOS and Windows
369 stars 131 forks source link

PWA support (browser) #158

Open jase88 opened 7 years ago

jase88 commented 7 years ago

Hi,

It would be great to have support for progressive web-apps (browser implementation). There will be probably be no way to detect locally installed apps, but each platform has possibilities to open specific apps:

Obviously this will only work if running on Windows Platform (Desktop or Mobile) or Android or iOS AND the navigation app has to be named explicitly to launch.

PWAs currently are only supported by Android, but will probably become more and more popular.

However this is more like a change request. This would require to detect the DeepLink/UniversalLink compatibility for several popular navigation apps on all three platforms as well as the implementation of the plugin for the browser.

Any suggestions welcome - thanks for your attention 😃

paulincai commented 6 years ago

Hi there,

i use PWA or "installed web app" or whatever they would call it on IOS and I initiate navigation via public URLs. The advantage with is is that is ... free of cost unlike having the Google API to do that. My first attempt was to integrate navigation via the Google Maps SDK but the URL was a too simple solution:

computedLocation = [lat, lng] destLocation = [lat, lng]

const location = computedLocation.toString() const destination = destLocation.toString()

If you have both your location and destination:

https://www.google.com/maps/dir/?api=1&origin=${location}&destination=${destination}&dir_action=navigate

else if you only have destination

http://maps.google.com/maps?q=loc:${lat},${lng}&navigate=yes