checkPermissionsStatus

fun Activity.checkPermissionsStatus(firstPermission: String, vararg otherPermissions: String): List<PermissionStatus>

Checks the status of the permissions without sending a request. Below API 23, the permission status can be PermissionStatus.Granted or PermissionStatus.Denied.Permanently depending on the presence of the permission in the manifest. Above API 23, when runtime permissions are necessary, the client doesn't know if a permission is permanently denied or it was never asked to the user. In this case the returned status is PermissionStatus.RequestRequired.

Return

the status of each permission.

Parameters

firstPermission

the first permission which should be requested.

otherPermissions

the other permissions that must be requested, if the request should handle more than one permission.