requestCameraPermission

fun requestCameraPermission(onGranted: () -> Unit, onDenied: () -> Unit)

Requests camera permission for the application.

This method initiates a permission request flow. If the permission is already granted, it invokes the onGranted callback immediately. Otherwise, it starts the PermissionActivity to request the permission from the user.

Note: Ensure to add in the app's manifest file.

Parameters

onGranted

Callback to be invoked if the permission is granted.

onDenied

Callback to be invoked if the permission is denied.