Manifest & Permissions

Android Package Visibility: Query Only the Apps You Need

Android package visibility limits which installed applications your app can discover through package queries. It is separate from whether an intent can launch a suitable app and separate from permission to access another app's private data.

By Updated 2 min read

Start with the integration you need

If the feature shares a document, opens a URL or launches a known partner app, investigate the narrow intent or package relationship first. Building a complete inventory of installed apps is usually unnecessary for that interaction.

The package-visibility documentation describes scoped <queries> declarations and automatically visible relationships. Use those rules rather than treating a filtered query result as a broken package manager.

Declare a narrow query

An illustrative manifest fragment for a known partner package is:

XML · REFERENCE EXAMPLE
<queries>
    <package android:name="com.example.partner" />
</queries>

The fragment belongs under <manifest>. Use the real package only when it corresponds to a necessary integration. Intent-based queries can be appropriate for broader capability matching, but should still reflect the feature.

Distinguish discovery from launch

A package query returning no result does not always establish that a user cannot complete an action through the platform. Follow the documented intent-handling pattern, resolve where appropriate and handle ActivityNotFoundException or an unavailable target gracefully.

Do not use a visibility workaround to infer sensitive information about installed applications unrelated to the feature.

Treat broad visibility as exceptional

QUERY_ALL_PACKAGES has Google Play policy restrictions. A developer convenience such as populating a generic installed-app dropdown is not automatically an eligible core use case.

Document why scoped queries are insufficient and review current policy before shipping a broad declaration. A successful local test does not establish store approval.

Verify the merged manifest

A dependency can introduce visibility declarations. APKLint's Manifest Checker can help inventory <queries> and broad package access, but it cannot decide whether the feature is proportionate or policy-eligible. Test intended integrations on clean devices and provide a useful fallback when no compatible app is available.

Sources and further reading

  1. Android Developers: Package visibility
  2. Google Play: Permissions and APIs that access sensitive information

Reference review: 22 September 2026. Examples illustrate the workflow; check your installed versions, release artifact and account-specific Console requirements before applying them. This guide is not a claim that APKLint executed your project or verified your private account.

APKLint

Android inspection tools and practical release guides. About APKLint · Report a correction