NativeScript / NativeScript/plugins

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

Open
#493 1 comment 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
206
Forks
123
Avg merge
2d 1h
Merged PRs (30d)
1

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with packages/directions/index.android.ts and the plugin's README files, then compare the reported behavior with Android's package-visibility documentation. Document the required entry for Google Maps and explain that it is needed for the directions action to work on Android 11 or newer; done means the README clearly includes these setup instructions.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, typescript
Domain
documentation, mobile
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.