Skip to main content

Callback / Listener interfaces

AcessoBioListener

Lifecycle callbacks for the SDK session. Pass an implementation to the AcessoBio constructor.

MethodTrigger
onErrorAcessoBio(error: ErrorBio)Error during the session
onUserClosedCameraManually()User closed the camera manually
onSystemClosedCameraTimeoutSession()Session expired due to timeout
onSystemChangedTypeCameraTimeoutFaceInference()Session timed out waiting for face alignment
iAcessoBioSelfie

Callbacks for selfie capture. Pass an implementation to UnicoCheckCameraOpener.Camera.open().

MethodTrigger
onSuccessSelfie(result: ResultCamera)Selfie capture succeeded — use result.encrypted to call the backend
onSuccess(result: SuccessResult)User Journey completed — returns the processId
onErrorSelfie(error: ErrorBio)Error during selfie capture
iAcessoBioDocument

Callbacks for document capture. Pass an implementation to UnicoCheckCameraOpener.Document.open().

MethodTrigger
onSuccessDocument(result: ResultCamera)Document capture succeeded
onErrorDocument(error: String)Error during document capture
CameraListener

Callbacks for the selfie camera preparation phase. Pass to prepareCamera().

MethodTrigger
onCameraReady(cameraOpener: UnicoCheckCameraOpener.Camera)Camera is ready — call cameraOpener.open(listener) to start capture
onCameraFailed(message: String)Camera preparation failed
DocumentCameraListener

Callbacks for the document camera preparation phase. Pass to prepareDocumentCamera().

MethodTrigger
onCameraReady(cameraOpener: UnicoCheckCameraOpener.Document)Camera is ready — call cameraOpener.open(documentType, listener) to start capture
onCameraFailed(message: String)Camera preparation failed