Skip to main content

Capture API

Methods to prepare a session

Call these methods on the UnicoCheckCamera interface obtained from the SDK builder. After preparation, the CameraListener.onCameraReady(cameraOpener) callback provides the opener to start capture.

MethodDescription
prepareCamera(config, listener)Prepares the selfie camera. listener is a CameraListener.
prepareDocumentCamera(config, listener)Prepares the document camera. listener is a DocumentCameraListener.
Opening the camera

After onCameraReady fires, call open on the received opener object:

Selfie — UnicoCheckCameraOpener.Camera

MethodDescription
open(listener: iAcessoBioSelfie)Opens the selfie camera
open(listener: iAcessoBioSelfie, webAppToken: String)Opens the selfie camera for a User Journey, passing the journey token

Document — UnicoCheckCameraOpener.Document

MethodDescription
open(documentType: DocumentType, listener: iAcessoBioDocument)Opens document capture for the specified type
open(documentType: DocumentType, description: String, listener: iAcessoBioDocument)Opens document capture with a custom description label
DocumentType

Defines the type of document to be captured. See Enums for the full list.

Result types and fields

ResultCamera — object returned on success.

FieldTypeDescription
base64StringCaptured image in Base64
encryptedStringJWT to be sent to the backend