> 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/android-sdk/configuration-parameters-for-liveness-detection.md).

# Configuration Parameters for Liveness Detection

The `LivenessDetectionBuilder` class lets you customize the liveness detection process. You build a `VidaLivenessDetector` by passing the calling activity and a configured `VidaLivenessRequest` , which carries the required and optional parameters described below.

## Building the detector

Initializing a LivenessDetectionBuilder instance requires two arguments:

<table><thead><tr><th width="203.23046875">Argument</th><th>Description</th></tr></thead><tbody><tr><td><code>activity</code></td><td>An instance of the calling Android activity, so the SDK can access the application context.</td></tr><tr><td><code>vidaRequest</code></td><td>A <code>VidaLivenessRequest</code> configuration object containing the information for the liveness detection request.</td></tr></tbody></table>

```java
VidaLivenessDetector detector = VidaLivenessDetector.LivenessDetectionBuilder
.getInstance(activity, vidaRequest)
.build();
```

## Required Parameters

The `VidaLivenessRequest` object must be initialized with the following mandatory fields:

<table><thead><tr><th width="121.234375">Parameter</th><th width="157.6484375">Method</th><th width="131.71875">Required</th><th>Description</th></tr></thead><tbody><tr><td>API Key</td><td><code>setApiKey()</code></td><td>Mandatory </td><td>Your API key used for authenticating SDK requests.</td></tr><tr><td>License Key</td><td><code>setLicenseKey()</code></td><td>Mandatory </td><td>Your license key to authorize the SDK.</td></tr><tr><td>User ID</td><td><code>setUserID()</code></td><td>Optional </td><td>A unique identifier representing the client/user.</td></tr></tbody></table>

{% hint style="info" %}
`setUserID()` is Optional starting from **SDK version 1.9.6**. Ensure this is set before initializing the detector.
{% endhint %}

### Example

Create a configured `VidaLivenessRequest` with the required keys and user ID:

<details>

<summary>Response</summary>

{% code expandable="true" %}

```java
/**
 * Creates a liveness request with the necessary API and License keys.
 *
 * @return A configured VidaLivenessRequest object.
 */
private VidaLivenessRequest createLivenessRequest() {
    VidaLivenessRequest request = new VidaLivenessRequest();
    request.setApiKey(KeyConstant.API_KEY_NORMAL);         // Mandatory
    request.setLicenseKey(KeyConstant.LICENSE_KEY_NORMAL); // Mandatory
    request.setUserID("USER-ID");                          // Optional (v1.96+)
    return request;
}
```

{% endcode %}

</details>

## Optional Parameters

The `LivenessDetectionBuilder` also provides optional configurations for the detection process. If any of these are not set, the SDK's default values are used.

<table><thead><tr><th width="187.37109375">Parameter</th><th width="231.19140625">Method</th><th>Description</th></tr></thead><tbody><tr><td>Detection Timeout</td><td><code>setDetectionTimeout()</code></td><td>The overall timeout for face detection on the front end (FE) - the maximum time the detector waits to detect a face in the frame.</td></tr><tr><td>Minimum Frame</td><td><code>setMinimumFrame()</code></td><td>The minimum number of continuous frames that satisfy the quality parameters. These frames are used for stable image capture and liveness analysis.</td></tr><tr><td>Eye Open Probability</td><td><code>setEyeOpenProbability()</code></td><td>The probability of eye openness required for successful detection (for example, 20% or 30%).</td></tr></tbody></table>

{% hint style="info" %}
**Defaults**: If any optional parameter is not defined, the SDK applies its built-in default value for that parameter.
{% endhint %}

## Behavioral Biometrics Configuration

Behavioral biometrics is part of ID Fraud Shield. It collects clipboard, copy-paste and typing signals during the flow.

These settings are **not** passed through `LivenessDetectionBuilder` or any other code on your side. They are configured per client by the VIDA team in the OSS Configuration Console. The SDK reads the configuration when it initializes and behaves accordingly.

**Available from:** Android Liveness SDK 1.9.8 · iOS Liveness SDK 1.9.6

#### Available Settings

<table><thead><tr><th width="297.265625">Setting</th><th>Description</th></tr></thead><tbody><tr><td><code>behavior_biometrics_enabled</code></td><td>Parent switch for all behavioral signals. When this is disabled, the two settings below have no effect.</td></tr><tr><td><code>clipboard_tracking</code></td><td>Clipboard and copy-paste events.</td></tr><tr><td><code>field_tracking</code></td><td>Typing, hesitation and field input events.</td></tr></tbody></table>

#### Default Behaviour

All three settings are **disabled by default on the SDK side**. If nothing is configured for your client, no behavioral signals are collected and the end user sees no clipboard permission prompt.

#### When to enable it

Enable these settings only for flows that contain input fields, such as name or date of birth. The liveness screen has no input fields, so these signals add no value there.

#### When a change takes effect

A configuration change is applied at the **next SDK initialization**. It never changes behaviour in the middle of an active session. An end user who is already in a session continues with the configuration that was read when that session started.

#### How to request a change

Contact your VIDA team. The settings are visible in the OSS Configuration Console only for clients who have ID Fraud Shield enabled.
