Skip to main content

User Journeys

User Journeys are multi-step capture sessions orchestrated by the SDK in conjunction with the configured flow. For example, a flow with Liveness + Risk Score + Document Capture + Electronic Signature executes selfie, document capture, and signature in a single session.

Use cases

The available journeys depend on the flow configured for your integration. Refer to Use Cases for the full mapping of use case → flow → capability.

How it works

The SDK:

  1. Reads the flow configuration provided during initialization.
  2. Orchestrates the sequence of captures required for the flow (selfie, document, signature).
  3. Returns a result object for each capture step.

The orchestration is handled entirely by the SDK — you do not need to implement the step sequence in your app.

Starting a User Journey
Step 1 — Implement AcessoBioListener

AcessoBioListener handles the SDK lifecycle callbacks. Implement the four mandatory methods:

MethodWhen it's called
onErrorAcessoBio(errorBio)An error occurred during SDK operation
onUserClosedCameraManually()The user manually closed the camera
onSystemClosedCameraTimeoutSession()The session time limit was reached — see Session limits
onSystemChangedTypeCameraTimeoutFaceInference()The face inference time limit was reached — switches to manual capture — see Session limits
val callback = object : AcessoBioListener {
override fun onErrorAcessoBio(errorBio: ErrorBio?) { }
override fun onUserClosedCameraManually() { }
override fun onSystemClosedCameraTimeoutSession() { }
override fun onSystemChangedTypeCameraTimeoutFaceInference() { }
}
Step 2 — Implement iAcessoBioSelfie

iAcessoBioSelfie handles the journey capture result callbacks:

MethodDescription
onSuccessSelfie(result)Image captured successfully — returns ResultCamera for subsequent REST API calls
onSuccess(result)WebApp flow completed successfully — returns SuccessResult with a processId used to query validation results
onErrorSelfie(errorBio)Capture failed — returns an ErrorBio with error details
val cameraListener: iAcessoBioSelfie = object : iAcessoBioSelfie {
override fun onSuccessSelfie(result: ResultCamera?) { }
override fun onSuccess(result: SuccessResult) { }
override fun onErrorSelfie(errorBio: ErrorBio?) { }
}
Step 3 — Call prepareCamera

With unicoCheckCamera initialized and both listeners implemented, call prepareCamera passing the SDK config, a CameraListener, and your web_app_token:

Where to get the web app token

The web_app_token is the process.webAppToken field returned by POST /client/v1/process when creating the process on your backend. See Create Process.

  • onCameraReady — camera is ready; call open passing the cameraListener and your web_app_token.
  • onCameraFailed — camera preparation failed; handle the error message.
unicoCheckCamera.prepareCamera(unicoConfig, object : CameraListener {
override fun onCameraReady(cameraOpener: UnicoCheckCameraOpener.Camera?) {
cameraOpener?.open(cameraListener, "your_web_app_token")
}

override fun onCameraFailed(message: String?) {
Log.e(TAG, message)
}
})

For the full result handling, see Receiving the result.