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.
| Method | Description |
|---|---|
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
| Method | Description |
|---|---|
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
| Method | Description |
|---|---|
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.
| Field | Type | Description |
|---|---|---|
base64 | String | Captured image in Base64 |
encrypted | String | JWT to be sent to the backend |