Skip to main content

Callback / Listener interfaces

Markdown
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
warning

For security reasons, Android SDK 6.13.0 and later no longer include the native document capture. The public API still exists for now, but calling it returns error 73905, "Unable to open document camera". It will be removed in an upcoming version. For more information, contact your CSM.

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

MethodTrigger
onSuccessDocument(result: ResultCamera)Deprecated. Never called since Android SDK 6.13.0. Document capture succeeded
onErrorDocument(error: String)Deprecated since Android SDK 6.13.0. Error during document capture
onErrorDocument(error: ErrorBio)Error during document capture, with code and description. Its default implementation passes only the description to onErrorDocument(String): override it to read the code.
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)Deprecated. Never called since Android SDK 6.13.0. Camera is ready — call cameraOpener.open(documentType, listener) to start capture
onCameraFailed(message: String)Deprecated since Android SDK 6.13.0. Camera preparation failed
onDocumentFailed(error: ErrorBio)Camera preparation failed, with code and description. Receives error 73905 on Android SDK 6.13.0 and later. Its default implementation passes only the description to onCameraFailed(String): override it to read the code.