Inspectopedia Help

Using APIs affected by query permissions

Using APIs affected by query permissions

Apps that target Android 11 cannot query or interact with other installed apps by default. If you need to query or interact with other installed apps, you may need to add a <queries> declaration in your manifest.

As a corollary, the methods PackageManager#getInstalledPackages and PackageManager#getInstalledApplications will no longer return information about all installed apps. To query specific apps or types of apps, you can use methods like PackageManager#getPackageInfo or PackageManager#queryIntentActivities.

Issue id: QueryPermissionsNeeded

https://g.co/dev/packagevisibility

Inspection Details

Available in:

IntelliJ IDEA 2023.3, Qodana for Android 2023.3, Qodana for JVM 2023.3

Plugin:

Android, 2022.3.1 Beta 2

Last modified: 13 July 2023