Skip to content

Permission Helper 2.0

Compare
Choose a tag to compare
@pankaj89 pankaj89 released this 01 Oct 11:18
· 13 commits to master since this release

Adds support to kotlin

permissionHelper = PermissionHelper(this, arrayOf(Manifest.permission.CAMERA, Manifest.permission.WRITE_EXTERNAL_STORAGE, Manifest.permission.CALL_PHONE), 100)
permissionHelper?.denied {
    if (it) {
        Log.d(TAG, "Permission denied by system")
        permissionHelper?.openAppDetailsActivity()
    } else {
        Log.d(TAG, "Permission denied")
    }
}

Request all permission

permissionHelper?.requestAll {
    Log.d(TAG, "All permission granted")
}