-
Notifications
You must be signed in to change notification settings - Fork 89
Open
Description
Hello,
Thanks for great library.
I got a problem about permissions.. If user has no permissions on Camera and Storage, MagicalCamera itself cannot handle it and "return mapPermissions?.get(permission)!!" returns NullPointerException. (Tried on both Java and Kotlin)
private fun isActivePermission(permission: String): Boolean {
// This map is return in method onRequestPermissionsResult for view what permissions are actives
if (android.os.Build.VERSION.SDK_INT >= 23) {
if (mapPermissions != null) {
if (mapPermissions!!.size > 0) {
// Obtain the code of camera permissions
return mapPermissions?.get(permission)!!
} else {
return true
}
} else {
return true
}
} else {
return true
}
}
I could not solve the problem, please help me.
Thank you