> For the complete documentation index, see [llms.txt](https://cartoonmango-1.gitbook.io/vida-ekyc-integration/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cartoonmango-1.gitbook.io/vida-ekyc-integration/integration-methods/sdk/android-sdk/configuration-parameters-for-liveness-detection.md).

# Configuration Parameters for Liveness Detection

The `LivenessDetectionBuilder` class in the Vida Liveness Detection SDK allows you to customize the liveness detection process with various configuration parameters. These parameters can be divided into two categories: Mandatory and Optional.

#### Mandatory Parameters

The following parameters are required for the initialization of the `LivenessDetectionBuilder` instance:

* `activity`: An instance of the calling Android activity is required for the SDK to have access to the application context.
* `VidaRequest`: A configuration object that contains the necessary information for the liveness detection request.

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

#### Optional Parameters

To further customize the face detection process, you can use the `VidaFaceDetectionOptionBuilder` class. This class allows you to specify parameters that influence the face detection algorithm. If any of these parameters are not defined, the SDK will use default values.

The following optional parameters can be set using the `VidaFaceDetectionOptionBuilder` class:

* `setDetectionTimeout(int timeout)`: Sets the overall timeout for face detection on the frontend side. This parameter defines how long the SDK should wait for a valid face detection result before aborting the process. The value is specified in milliseconds.
* `setMinimumFrame(int count)`: Defines the minimum number of continuous frames that satisfy the quality parameters. This is used to ensure that the detected face is stable and of sufficient quality for further processing.
* `setEyeOpenProbability(float probability)`: Sets the probability threshold for eye-open detection. This parameter is used to ensure that the detected face has open eyes. The value is specified as a percentage (e.g., 20%, 30%).
* `setMinimumPreviewWidth(int width)` and `setMinimumPreviewHeight(int height)`: These parameters are used to set the minimum width and height, respectively, of the camera preview. These parameters should be used only for the SDK UI.
