> For the complete documentation index, see [llms.txt](https://docs.vida.id/identity-stack/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.vida.id/identity-stack/verify/liveness/integration/liveness-sdk/sdk-user-journey.md).

# SDK User Journey

User initiates the liveness verification process from the host application.

## **Tutorial Screen**

The tutorial provides clear instructions on how the user can complete the liveness verification process.

It includes dos and don'ts, emphasising the importance of proper lighting and positioning for a successful verification.

<figure><img src="/files/BWWPLGLX4OD8fAx9mi4j" alt="" width="180"><figcaption></figcaption></figure>

{% hint style="info" %}
The Tutorial screen can be disabled/enabled in the host application using the `setShowTutorialScreen method.`
{% endhint %}

## **Camera Permission Screen**

If camera permission is not enabled, a pop-up screen appears, requesting permission to access the device's camera.The user can choose to grant or deny camera permission through the host application settings.

<figure><img src="/files/FqcOCOBjrMumYocqxQhO" alt="" width="180"><figcaption></figcaption></figure>

***

## Overview

VIDA provides 4 types of selfie capture flows for liveness verification:

* [**Passive Liveness**](#passive-liveness-selfie-capture-flow) **– Selfie Capture Flow**
* [**Active Liveness**](#active-liveness-selfie-capture-flow) **–  Gesture Selfie Capture Flow**
* [**Active Liveness**](#active-liveness-selfie-capture-flow) - **Zoom Selfie Capture Flow**
* [**Color Flash**](#color-flash-selfie-capture-flow) **– Selfie Capture Flow**

***

## **Passive Liveness - Selfie Capture Flow**

Upon completing the tutorial, the user is taken to the camera preview screen. The screen includes an oval frame where the user is instructed to frame their face.&#x20;

<figure><img src="/files/KEGk26Y2JXLaKObydQYX" alt=""><figcaption></figcaption></figure>

Users will be shown various prompts to guide them through the selfie capture process

<figure><img src="/files/vReKNdqN6NuVigqQP141" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/LaNaZB9BX4blyBVYskgl" alt=""><figcaption></figcaption></figure>

* "Frame Your Face in the Oval" (Encouraging proper alignment)
* "Face Too Far" (Alerting if the face is too distant)
* "Face Too Close" (Alerting if the face is too close to the camera)
* "Face Detected" (Confirming successful face detection)
* "Dark Image" ( Alerting if the image is Dark. Only in Android SDK)
* "No Face Detected" (Alerting if the camera cannot detect a face)
* "Multiple Face Detected" ( Alerting if multiple faces are visible in the frame)
* "Eyes Closed" ( Alerting if the eyes of the person capturing selfie is closed
* "Left Eye Closed" ( Alerting if the left eye of the person capturing selfie is closed
* "Right Eye Closed" ( Alerting if the right eye of the person capturing selfie is closed
* "Face Not Straight" ( Alerting if the face of the person is not straight)
* "Eyes Occluded" (Alerting if the eyes of the person is occluded)

Once the user properly frames their face, the liveness capture process gets initiated. After capturing the user's selfie, they are directed to a review screen.

***

## **Active Liveness - Selfie Capture Flow**

Active liveness supports `ZOOM_FACE`  and  gestures such as `BLINK, SMILE, SHAKE_HEAD`.&#x20;

If no gesture is specified when active liveness is enabled, the ZOOM\_FACE gesture will be used by default.

### **ZOOM gestures**

In the ZOOM\_FACE flow, the user will be prompted to adjust their face within three consecutive, randomly-sized concentric frames. The SDK performs gesture validation before initiating the liveness verification process.

<figure><img src="/files/yShh51yZhEugKoxYcwOv" alt=""><figcaption></figcaption></figure>

### **SMILE/BLINK/SHAKE\_HEAD Gestures**&#x20;

The user will be prompted to do one or more of the required [gestures](#guided-prompts-for-gestures). Once the user properly frames their face and performs the required gestures, SDK verifies the gestures and the liveness check gets initiated.&#x20;

<figure><img src="/files/sWIcMBAD06r94fj91j60" alt=""><figcaption></figcaption></figure>

### Guided Prompts for Gestures

&#x20;Users will be shown various prompts to guide them through the gesture-based liveness capture process:

* "Blink Your Eyes" (Prompting the user to blink)&#x20;
* "Smile" (Prompting the user to smile)&#x20;
* "Shake Your Head" (Prompting the user to shake their head)

<figure><img src="/files/7TqkuYAyFfG0G9zk9IVt" alt=""><figcaption></figcaption></figure>

## **Review Screen**

Here, the user can preview the captured photo to ensure it meets the required criteria (proper lighting, visibility, etc.).

<figure><img src="/files/Uzqbo9pBvzU94wvlI7ue" alt="" width="180"><figcaption></figcaption></figure>

* Options are provided to either submit the selfie or retake it.
* Choosing to retake the selfie will return the user to the initial tutorial screen for further guidance.
* Submitting the selfie triggers the transmission of the photo to the Vida backend for liveness verification using algorithms.

{% hint style="info" %}
**`setShowReviewScreen()`**&#x6D;ethod can be used to update if the review screen needs to be shown. The method returns `boolean` value which denotes if the review screen can be shown or not.
{% endhint %}

***

## **Liveness Check**

The VIDA backend processes the submitted selfie using its algorithms to verify liveness.It checks for facial movements, ensuring the user is not presenting a static image. The result of the verification is returned from the backend with the status and the relevant success and error codes.&#x20;

## **Host Application Success Screen**

If the liveness verification is successful, the host application displays a customised success screen. The user is informed that their liveness check has been successfully completed and directed to the next steps within the host application, which could include account creation, access to a specific service, or any other relevant actions.

<figure><img src="/files/nAiLtzFtsvLgFbXn6Zb6" alt="" width="220"><figcaption></figcaption></figure>

## Liveness Detection Error

If the liveness check gets failed, the VIDA backend will respond with the error message and the corresponding error code.

<figure><img src="/files/05wExnbs6arQnEl9H5qF" alt="" width="563"><figcaption></figcaption></figure>

***

## Color Flash - Selfie Capture Flow

To verify user liveness through **dynamic color flash sequences**. This ensures the selfie is captured under varying light conditions to detect presentation attacks (e.g., printed photo, screen replay).

<figure><img src="/files/9bpYEKzMBm48gePhfNol" alt=""><figcaption></figcaption></figure>

User aligns their face in the frame and the system automatically captures 6 selfies with sequential color flashes to verify liveness.

## Color Flash - Selfie Prompt

<figure><img src="/files/J7oyDSIVDtdOLGoV2Roz" alt="" width="563"><figcaption></figcaption></figure>

* **Position your face within the frame** – Align your face inside the oval guide.
* **Face area is too dark, move to a well-lit place** – Ensure your face is clearly visible with enough light.
* **Great! Stay still for clear photos** – Remain still while the system captures your selfie.

These prompts guide users step-by-step to ensure proper alignment, lighting, and stability, resulting in a successful selfie capture and liveness verification.
