plugins icon indicating copy to clipboard operation
plugins copied to clipboard

Directions on Android: Package visibility query required to open Maps app; nothing happens otherwise

Open jacobconley opened this issue 2 years ago • 1 comments

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

jacobconley avatar May 10 '23 17:05 jacobconley

thank you so much for this!

brskBernard avatar Mar 13 '25 13:03 brskBernard