For the complete documentation index, see llms.txt. This page is also available as Markdown.

Video Identification - VideoID

Introduction

The face capture is performed with the VideoID Component.

This component is responsible for recording a user identifying themselves, showing their face and Identity document.

  • Internal management of cameras, microphone, and permissions.

  • Connection to services.

  • OCR reading and document capture.

In the section on Simplified Launch the steps necessary for the basic integration of the SDK are detailed. In this section, information is added for launching this component.


Dependency

The specific dependency for the component is:

implementation "com.facephi.androidsdk:video_id_component:$version"

Available controllers

Controller

Description

VideoIdController

Main video identification controller

SignatureVideoIdController

Controller for signing a process with a Face Capture


Simplified Launch

Once the SDK has started and a new operation has been created, the component can be launched. Any of its controllers can be used to execute its functionality.

Launch:


Basic configuration

To launch the current component, an object must be created VideoIdConfigurationData which will be the configuration of the component controller.

The basic configuration needed is the following:

The different modes are:

  • VideoIdMode.ONLY_FACE

  • VideoIdMode.FACE_DOCUMENT_FRONT

  • VideoIdMode.FACE_DOCUMENT_FRONT_BACK

  • VideoIdMode.DOCUMENT_FRONT

  • VideoIdMode.DOCUMENT_FRONT_BACK


Receipt of the result

The launch will return the information in SdkResult format, allowing distinction between a successful launch and an unsuccessful one:

Error handling

Errors will be returned as a 'VideoIdError' object.

Error list:

  • VID_ACTIVITY_RESULT_MSG_ERROR: The activity result is incorrect

  • VID_APPLICATION_CONTEXT_ERROR: The required application context is null

  • VID_CANCEL_BY_USER: The user has canceled the process

  • VID_CANCEL_LAUNCH: A general SDK cancellation has been made

  • VID_COMPONENT_LICENSE_ERROR: The component License is incorrect

  • VID_EMPTY_LICENSE: The License String is empty

  • VID_FACE_DETECTION_TIMEOUT: No face has been detected

  • VID_FETCH_DATA_ERROR: Error retrieving the result

  • VID_FLOW_ERROR: Error in the flow process

  • VID_INITIALIZATION_ERROR: Initialization error

  • VID_MANAGER_NOT_INITIALIZED: Managers are null

  • VID_NETWORK_CONNECTION: Internet connection error

  • VID_NO_DATA_ERROR: Input data is null

  • VID_OPERATION_NOT_CREATED: There is no operation in progress

  • VID_PERMISSION_DENIED: The user has rejected the permissions

  • VID_SOCKET_ERROR: Error connecting to services

  • VID_TIMEOUT: Timeout in the process

  • VID_VIDEO_ERROR: Error processing the video

  • VID_VIDEO_CALL_ACTIVE: Cannot start because there is already an active Video Call

  • VID_VIDEO_RECORDING_ACTIVE: Cannot start because the video recording process is active

Successful execution received - data

In the SdkResult.Success part - data, the VideoIdResult class will be available.

The result returns the images in format SdkImage, it is possible to extract the bitmap by accessing image.bitmap. If you want to convert it to base64 you can use the function:

Base64.encodeToString(this.toByteArray(), Base64.NO_WRAP)

The fields returned in the result are the following:

frontDocumentData

Document front-side data. Includes:

  • documentImage: Document image

  • documentFullImage: Full captured image

  • documentFaceImage: If a face has been found in the document, its image is returned.

  • iqaOverExposure: Numeric value between 0 and 1 indicating the image's overexposure level; a high value suggests the image is too brightly lit, which may make the document difficult to read.

  • iqaReadable: Numeric value between 0 and 1 indicating the readability of the document text; higher values imply that the text is clearer and easier to recognize.

  • iqaSharpness: Numeric value between 0 and 1 indicating the sharpness of the document image; high values reflect a more focused image, which improves data extraction capability.

  • documentFaceImageTokenized: If a face has been found in the document, its encrypted image is returned.

backDocumentData

Document back-side data. Includes:

  • documentImage: Document image

  • documentFullImage: Full captured image

  • documentFaceImage: If a face has been found in the document, its image is returned.

  • iqaOverExposure: Numeric value between 0 and 1 indicating the image's overexposure level; a high value suggests the image is too brightly lit, which may make the document difficult to read.

  • iqaReadable: Numeric value between 0 and 1 indicating the readability of the document text; higher values imply that the text is clearer and easier to recognize.

  • iqaSharpness: Numeric value between 0 and 1 indicating the sharpness of the document image; high values reflect a more focused image, which improves data extraction capability.

  • documentFaceImageTokenized: If a face has been found in the document, its encrypted image is returned.

faceImage

User image captured in the first section of the process.

ocrMap

OCR map extracted from the document.

ocrDiagnostic

Dictionary containing the document's OCR diagnostic. The keys are the fields to validate and the values are OcrDiagnostic instances.

OCR diagnostic extracted from the document.

  • OK: The OCR is correct.

  • NOT_FOUND: The OCR key is not found.

  • TOLERANCE_ERROR: The OCR is not correct.

  • WARNING: The OCR is not correct, but it is only a warning because it is an optional field.

matchingSidesScore

Numeric value between 0 and 1 that estimates the level of match between the document sides (front and back).

documentType

Type of document obtained.

personalData

Reduced set of data obtained from the user:

  • issuer

  • documentNumber

  • issueDate

  • expiryDate

  • name

  • surname

  • fullName

  • gender

  • birthDate

  • birthPlace

  • nationality

  • address

  • nfcKey

  • numSupport

  • mrz

speechText

Text that the user must say during video recording.

faceImageTokenized

Encrypted user image captured in the first section of the process.


Advanced information

This section expands on the information of the component.

Advanced configuration of the component

To launch the current component, a _VideoIdConfigurationData _ object must be created, which will be the component controller configuration.

The fields included in the configuration (url, apiKey, tenantId) usually do not need to be provided as they are completed internally through the License used.

These fields are usually provided only when the server is On-Premise.

url

Path to the video socket

apiKey

ApiKey required for the connection to the video socket

tenantId

Tenant identifier referring to the current client, required for the connection to the video service.

sectionTime

Indicates the duration of sections with associated time (face capture and camera switching).

mode

  • ONLY_FACE: The process is performed by capturing the user's face.

  • FACE_DOCUMENT_FRONT: The process is performed by capturing the user's face and the front of the Identity document.

  • FACE_DOCUMENT_FRONT_BACK: The process is performed by capturing the user's face and the complete Identity document.

  • DOCUMENT_FRONT: The process extracts information only from the front of the document.

  • DOCUMENT_FRONT_BACK: The process extracts information only from the complete document.

timeoutServerConnection

Maximum wait time in ms for the server response.

sectionTimeout

Maximum time allowed to complete a section (in ms).

autoFaceDetection

Enables/disables automatic face detection.

debug

Enables the display of additional information useful for diagnosing and monitoring internal behavior.

countryFilter

Allows processing to be restricted to a specific set of countries, accepting an array of strings representing aliases in ISO3 format (3-letter code according to the ISO 3166-1 standard).

documentFilter

Allows restricting the types of documents accepted during capture. Possible values are:

  • "IDC": Identity document (ID Card)

  • "PSP": Passport (Passport)

  • "DLI": Driver License (Driver License)

  • "VIS": Visa (Visa)

  • "FOC": Foreign Card (Foreign Card)

  • "INV": Invoice (Invoice)

  • "CUS": Custom Document (Custom Document)

speechText

Text that the user must say during video recording.

ocrValidations

Dictionary containing the OCR validations to perform. The keys are the fields to validate and the values are OcrValidationValue instances.

OcrValidationValue has the following fields:

  • value: The value to validate.

  • tolerance: The tolerance level for validation.

    • STRICT: Strict validation.

    • LOW_TOLERANCE: Low-tolerance validation.

    • MEDIUM_TOLERANCE: Medium-tolerance validation.

    • HIGH_TOLERANCE: High-tolerance validation.

  • validationType: The type of validation to perform.

    • OPTIONAL: Optional validation.

    • REQUIRED: Mandatory validation.

ocrMaxWarnings

Maximum number of warnings allowed in OCR validation.

maxRetries

Maximum number of retries allowed for OCR validation. The default value is 3.


Component Customization

Apart from the changes that can be made at the SDK level (which are explained in the document of SDK Customization), this specific component allows modification of its interface.

Text

Texts can be customized by adding an XML resource file in the client application and overwriting the default values.

Animations

If you want to modify the SDK's animations (lottie), you would have to include the animations with the same name in the app's res/raw/ folder.

External views

It is possible to completely customize the component screens while maintaining their functionality and navigation. To do so, the following interfaces must be implemented:

Error diagnostic screen:

Once the classes that implement the interfaces have been created, the component launch can include the "customViews" parameter so that they are used in the SDK.

Last updated