private fun isCameraPermissionDeclared(context: Context): Boolean { return context.packageManager.getPackageInfo(context.packageName, PackageManager.GET_PERMISSIONS) .requestedPermissions .contains(Manifest.permission.CAMERA) }
Returns if we need to check for the camera permission or not.