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. The limited package visibility reduces the number of apps that appear to be installed on a device, from your app's perspective.
This filtering behavior helps minimize the amount of potentially sensitive information that your app doesn't need in order to fulfill its use cases, but that your app can still access. 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.
The limited app visibility affects the return results of methods that give
information about other apps, such as
The limited visibility also affects explicit interactions with other apps, such
as starting another app's service.
Some packages are still visible
automatically. Your app can always see
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 for common
app interaction scenarios.
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
based on an upcoming
To learn more about package visibility on Android, view the following materials:
- Package visibility in Android 11, available on Medium.