isPermissionGranted

fun Context.isPermissionGranted(permission: String): Boolean

Convenience method to check if a permission is granted or not. This method is compatible with all API versions.

Return

true if the permission is granted, false otherwise.

Parameters

permission

permission that must be checked.