Capture API
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) | Deprecated since Android SDK 6.13.0. Prepares the document camera. listener is a DocumentCameraListener. |
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.
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 |
open(listener: iAcessoBioSelfie, idSmartOptions: UnicoIDSmartOptions) | Opens the selfie camera against a reference process, passing UnicoIDSmartOptions |
Document — UnicoCheckCameraOpener.Document
| Method | Description |
|---|---|
open(documentType: DocumentType, listener: iAcessoBioDocument) | Deprecated since Android SDK 6.13.0. Opens document capture for the specified type |
open(documentType: DocumentType, description: String, listener: iAcessoBioDocument) | Deprecated since Android SDK 6.13.0. Opens document capture with a custom description label |
UnicoIDSmartOptions — reference process for the capture. Available from Android SDK 6.13.0.
| Field | Type | Required | Description |
|---|---|---|---|
referenceProcessId | String | yes | Id of an earlier, concluded process of the same user, created by your account (for example, the user's Onboarding). Use the id that the Unico API returned when that process was created. This capture compares against it. |
useCase | String | yes | Context of the operation. Use one of the values listed in Smart Revalidation. |
This option requires Smart Revalidation enabled for your account. Contact your Unico representative before you use it. Without it, the camera runs the regular capture.
Deprecated since Android SDK 6.13.0. Defines the type of document to be captured. See Enums for the full list.
ResultCamera — object returned on success.
| Field | Type | Description |
|---|---|---|
base64 | String | Captured image in Base64 |
encrypted | String | JWT to be sent to the backend |