permissionsResultCamera

fun permissionsResultCamera(grantResults: IntArray, activity: Activity, context: Context, cameraLauncher: ActivityResultLauncher<Intent>): File?

Defines the behavior depending on whether the user granted (or denied) the necessary permissions for taking a photo using the device camera.

Return

file corresponding to the photo taken using the device camera. If the user denied the necessary permissions to complete the operation, null is returned.

Parameters

grantResults

grant results for the corresponding permissions which is either PackageManager.PERMISSION_GRANTED or PackageManager.PERMISSION_DENIED. Never null

activity

activity calling this method

context

context tied to the activity calling this method

cameraLauncher

activity result launcher related to taking photos using the device camera