Why is PackageInfo.requestedPermissions always null?

I am trying to list all the permissions used by all installed packages, however when I check the requestedPermissions property for each of my installed packages it is always null.

+2


a source to share


1 answer


I just need to pass the PackageManager.GET_PERMISSIONS flag to getInstalledPackages (). Here is a code snippet.



getPackageManager () getInstalledPackages (PackageManager.GET_PERMISSIONS) ;.

+3


a source







All Articles