mattermoran / map_launcher

Flutter plugin for launching maps
MIT License
259 stars 116 forks source link

Getting new navigation apps to work #124

Closed frankvollebregt closed 1 year ago

frankvollebregt commented 1 year ago

Hello! Thank you for this package, it has been very useful so far. I forked this repository and was trying to add the TomTom Go app to the package.

I'm trying to understand how the URLs are launched: The protocols (before the ://) seem to help iOS identify which app to send the URL to, and on Android the package/bundle identifiers are included for this purpose. However, is the same URL used for both? That is, does the Android app of say Waze accept the URL

waze://?ll=52.358269,4.882825&z=10&navigate=yes

and is that how it launches Waze correctly? Or is a separate intent used?

The reason I'm asking this is that while on iOS, the URL as already specified in #111 works (or rather, should work, I don't have an iPhone with an account to test it right now), but if I pass this same URL to the Android app, it does not work, whereas sending a simple geo:$lat,$long intent does... Is this just TomTom doing a sloppy job by not accepting the same URL scheme for their Android and iOS apps, or am I missing something in this package and its structure that allows me to specify this?

mattermoran commented 1 year ago

Hey @frankvollebregt You are correct, on ios the app can only be identifier by the url scheme like theapp:// but on android it uses bundle identifier. Based on messages here it uses different urls for android and ios but that's not a problem as that's quite common and you can see it in directions_url.dart So you should be able to just use tomtomgo:// on ios and geo: on android

Let me know if there's any issues and feel free to submit a PR :)