Skip to main content

Error handling

All error handling for the Android SDK is centralized in this section. The onErrorAcessoBio callback receives an ErrorBio object with code (Int) and description (String).

Handling the callback
override fun onErrorAcessoBio(error: ErrorBio) {
when (error.code) {
73002 -> { /* camera permission denied — redirect to app settings */ }
73006 -> { /* running on emulator — physical device required */ }
73100 -> { /* no internet connection */ }
else -> { /* generic error handling */ }
}
}
Lifecycle callbacks

In addition to onErrorAcessoBio, the SDK also triggers:

  • onUserClosedCameraManually() — user closed the camera manually.
  • onSystemClosedCameraTimeoutSession() — session expired due to timeout.
  • onSystemChangedTypeCameraTimeoutFaceInference() — no face detected for 13 seconds; the SDK switches to manual capture.
Error codes

All error codes originate from the UnicoException enum and are delivered via ErrorBio(code, message). The message field contains the exact SDK string — do not modify or localize it.

CodeMessageDescription
73001Context invalidInvalid Android context passed to the SDK
73002Did not grant permission to open cameraCamera permission was denied by the user
73003The lest API is 21(LOLLIPOPDevice API level is below the minimum required (API 21)
73004Could not find implementation interface callback iAcessoBioSelfieiAcessoBioSelfie interface not implemented
73005Could not find implementation interface callback iAcessoBioDocumentiAcessoBioDocument interface not implemented
73006Unable to open camera on emulatorsSDK does not run on emulators — use a physical device
73007Unknown and unexpected error in WebApp…Generic WebApp error (camera, storage, security, networking)
73100Unable to connect to internet.No internet connection available
73200Please inform the config object or json file nameConfiguration object or JSON file not provided
73202Unable to parse json fileJSON configuration file is malformed
73204Unable to initialize the SDK, please configure the environment on setEnviroment method of buildsetEnvironment() not called before initialization
73300Unable to get unico authentication objectFailed to retrieve authentication object
73301Unable to parse objectFailed to parse authentication response
73302Could not find the unico tokenUnico auth token not found
73303Current host is not registeredBundle identifier not registered in the SDK Key
73400Could not initialize cameraCamera initialization failed
73701Could not find active liveness importActive liveness module not found
73703Unable to get active liveness sessionFailed to obtain a liveness session
73718The Session was cancelled because of an unknown and unexpected error…Unknown internal session error
73721The Session can't be performed: attempts limit exceeded.Session cancelled — capture attempt limit reached
73722The Session can't be performed: face alignment timeout.Session cancelled — face alignment timed out
73726An error happened during video recordingVideo recording error during liveness
73727No actions found in a videoNo liveness actions detected in video
73740The user pressed the do not consent button and did not complete the Session.User declined consent
73800Could not build encrypted key.Failed to build the encrypted JWT
73801The Session of SDK was cancelled because of an unknown and unexpected error.Unknown internal SDK session error
73802The Session was cancelled because of an unknown and unexpected error…Session cancelled — missing required JWT fields
73900Erro ao analisar imagemError analyzing the captured image
73901É necessário implementar a interface AcessoBioListenerAcessoBioListener interface not implemented
73902É necessário insirir um valor maior que 40 segundos no método: setTimeoutSession.setTimeoutSession value must be greater than 40 seconds
73903Arquivo de configuração corrompido. Verifique o arquivo json e tente novamente.Corrupted configuration file — verify and retry
73904Erro ao finalizar processoError finalizing the capture process
73905Unable to open document cameraDocument camera could not be opened
73906Document type uninformedDocument type was not specified
74001onSuccess: not implemented when using open:webAppToken:onSuccess callback not implemented for User Journey
74100Could not prepare SDK-SFailed to prepare SDK components
74101No URL token was provided.No URL token provided for the journey
74102Environment type was not specified.Environment (PROD/UAT) not configured
737120Unable to initialize livenessLiveness activity could not be initialized
737220Capture could not startCapture process failed to start
737320Transaction could not startTransaction could not be initiated
737321The Session was cancelled because of an unknown and unexpected error. This return value is a catch-all for errors experienced during normal usage of these APIs. Try again.Generic session provider error — retry
REST API error codes

The codes above are SDK callback errors. REST API error codes (HTTP status families) are documented separately at API Reference > Error codes.