Package visibility filtering on Android
Stay organized with collections
Save and categorize content based on your preferences.
When an app targets Android 11 (API level 30) or higher and queries for
information about the other apps that are installed on a device, the system
filters this information by default. This filtering behavior means that your app
can’t detect all the apps installed on a device, which helps minimize the
potentially sensitive information that your app can access but doesn't need
to fulfill its use cases.
Also, filtered package visibility helps app
stores like Google Play assess the privacy and security that your app provides
for users. For example, Google Play considers the list of installed apps to be
personal and sensitive user
data.
Limited app visibility affects the results returned by methods that give
information about other apps, such as
queryIntentActivities()
,
getPackageInfo()
,
and
getInstalledApplications()
.
The limited visibility also affects explicit interactions with other apps, such
as starting another app's service.
Some packages are visible
automatically. Your app can always
detect these packages in its queries for other installed apps. To view other
packages, declare your app's need for increased package
visibility using the
<queries>
element. The use
cases page provides examples of how you
can selectively expand package visibility. The workflows described there allow
you to fulfill common app interaction scenarios while protecting user privacy.
In the rare cases where the <queries>
element doesn't provide adequate package
visibility, you can use the QUERY_ALL_PACKAGES
permission. If you publish your
app on Google Play, your app's use of this permission is
subject to approval.
The page about
testing package visibility behavior
offers suggestions for how to test behavior changes based on package visibility
when your app relies on interactions with other apps.
Additional resources
To learn more about package visibility on Android, view the following materials:
Blog posts
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-08-26 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-26 UTC."],[],[],null,["# Package visibility filtering on Android\n\nWhen an app targets Android 11 (API level 30) or higher and queries for\ninformation about the other apps that are installed on a device, the system\nfilters this information by default. This filtering behavior means that your app\ncan't detect all the apps installed on a device, which helps minimize the\npotentially sensitive information that your app can access but doesn't need\nto fulfill its use cases.\n\nAlso, filtered package visibility helps app\nstores like Google Play assess the privacy and security that your app provides\nfor users. For example, Google Play considers the list of installed apps to be\n[personal and sensitive user\ndata](https://support.google.com/googleplay/android-developer/answer/10144311#zippy=%2Cexamples-of-common-violations).\n\nLimited app visibility affects the results returned by methods that give\ninformation about other apps, such as\n[`queryIntentActivities()`](/reference/android/content/pm/PackageManager#queryIntentActivities(android.content.Intent,%20int)),\n[`getPackageInfo()`](/reference/android/content/pm/PackageManager#getPackageInfo(java.lang.String,%20int)),\nand\n[`getInstalledApplications()`](/reference/android/content/pm/PackageManager#getInstalledApplications(int)).\nThe limited visibility also affects explicit interactions with other apps, such\nas starting another app's service.\n\nSome packages are [visible\nautomatically](/training/package-visibility/automatic). Your app can always\ndetect these packages in its queries for other installed apps. To view other\npackages, [declare your app's need for increased package\nvisibility](/training/package-visibility/declaring) using the\n[`\u003cqueries\u003e`](/guide/topics/manifest/queries-element) element. The [use\ncases](/training/package-visibility/use-cases) page provides examples of how you\ncan selectively expand package visibility. The workflows described there allow\nyou to fulfill common app interaction scenarios while protecting user privacy.\n\nIn the rare cases where the `\u003cqueries\u003e` element doesn't provide adequate package\nvisibility, you can use the `QUERY_ALL_PACKAGES` permission. If you publish your\napp on Google Play, your app's use of this permission is\n[subject to approval](https://support.google.com/googleplay/android-developer/answer/10158779).\n\nThe page about\n[testing package visibility behavior](/training/package-visibility/testing)\noffers suggestions for how to test behavior changes based on package visibility\nwhen your app relies on interactions with other apps.\n\nAdditional resources\n--------------------\n\nTo learn more about package visibility on Android, view the following materials:\n\n### Blog posts\n\n- [Package visibility in\n Android 11](https://medium.com/androiddevelopers/package-visibility-in-android-11-cc857f221cd9), available on Medium."]]