What is the difference between requestedPermissions
and permissions
?
PackageInfo _pi = getPackageManager().getPackageInfo(this.getPackageName(),
PackageManager.GET_PERMISSIONS);
// permissions
PermissionInfo[] _permissions = _pi.permissions;
// requestedPermissions
String[] _requestedPermissions = _pi.requestedPermissions;
Is it about application's permissions and OS's permissions?
Thanks
As in the documentation
and
so
permissionInfo
will have theattributes
inmanifest
tag in manifest for e.g.and
requstedPermissions will return the permissions in
<uses-permission>
tag for e.gif you want get all permissions pre checked in manifest you must use code below:
if you want check permission granted by user or not, you can use: