Directions on Android: Package visibility query required to open Maps app; nothing happens otherwise
Howdy, I just ran into this issue at my day job, where I'm maintaining a Nativescript app that hasn't been touched in a few years. I'm new to Android and I don't fully understand it under the hood, but it seems that I was able to figure it out, but didn't see it documented anywhere in the READMEs. I don't quite have time to create a pull request at the moment and it's not obvious how I should contribute to this, but I wanted to at least create an issue and I might be able to submit something myself later.
As described in this documentation, apps that target Android 11 or newer need to add a <queries> element to their manifests in order to open the Google Maps app. Before I added it, our "directions" button would silently fail. Mine looks like this:
<queries>
<package android:name="com.google.android.apps.maps" />
</queries>
From the source at index.android.ts, it doesn't seem like the app is trying to do open the maps app directly (it just uses a URL), but I imagine something is changing that internally.
Cheers, I appreciate the hard work y'all have put into this ecosystem
thank you so much for this!