> For the complete documentation index, see [llms.txt](https://docs.facephi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.facephi.com/docs.facephi-en/products/idv-suite/flujos-and-integraciones/configuracion-tecnica-del-cliente/sdk-mobile/android-sdk/componentes-modulos/captura-facial-con-iad.md).

# Face Capture with IAD

> #### **Differences from standard Face Capture**
>
> The **Selphi IAD Component** is functionally equivalent to the **Selphi Component** standard, incorporating additional security controls aimed at detecting video injection attacks and untrusted capture environments.
>
> The integration, configuration, and usage flow of the component are the same. The main functional difference is the inclusion of the field `iad` in the result (`SelphiResult`), which contains the antifraud analysis information prepared for server-side verification.
>
> A new License is required for its use, and the dependency on the standard component must be replaced with:
>
> ```java
> implementation "com.facephi.androidsdk:selphi_iad_component:$version"
> ```

{% hint style="info" %}
This component has two important restrictions:

* Devices with **at least 3 GB of RAM**.
* **Front camera** with preview of **1920x1080 or higher**.
  {% endhint %}

## Introduction <a href="#id-1-introduccion" id="id-1-introduccion"></a>

Face Capture with video injection attack detection is performed through the **Selphi IAD Component**.

This component is responsible for capturing a user's selfie and extracting the most relevant facial features, incorporating a set of preventive security controls aimed at detecting untrusted environments. During the process, the following steps are performed, among others:

* Internal camera and permission management.
* Detection of spoofing attempts using videos or manipulated camera sources.
* Guided assistance during Face Capture.
* Generation of biometric templates and user images.

***

## Dependency <a href="#id-2-dependencia" id="id-2-dependencia"></a>

The specific dependency for the component is:

```kotlin
implementation "com.facephi.androidsdk:selphi_iad_component:$version"
```

***

## Available controllers

This component includes several controllers, each oriented toward a specific functionality.

<table><thead><tr><th>Controller</th><th width="374">Description</th></tr></thead><tbody><tr><td><code>FSelphiController</code></td><td>Main Facial Recognition controller</td></tr></tbody></table>

***

## Error handling <a href="#id-6-recepcion-del-resultado" id="id-6-recepcion-del-resultado"></a>

Errors will be returned as a 'SelphiError' object.

<details>

<summary>Face Capture error list with IAD:</summary>

* SPI\_ACTIVITY\_RESULT\_ERROR: The activity result is incorrect.
* SPI\_ACTIVITY\_RESULT\_MSG\_ERROR: The activity result received in the msg is incorrect.
* SPI\_APPLICATION\_CONTEXT\_ERROR: The required application context is null.
* SPI\_BAD\_EXTRACTOR\_CONFIGURATION\_ERROR: Widget: Incorrect extractor configuration.
* SPI\_CAMERA\_PERMISSION\_DENIED: The user has denied permissions.
* SPI\_CANCEL\_BY\_USER: The user has canceled the process.
* SPI\_CANCEL\_LAUNCH: A general cancellation of the SDK has been made.
* SPI\_COMPONENT\_LICENSE\_ERROR: The component license is not valid.
* SPI\_CONTROL\_NOT\_INITIALIZATED\_ERROR: Widget: Initialization error.
* SPI\_EMPTY\_LICENSE: The license String is empty.
* SPI\_EXTRACTION\_LICENSE\_ERROR: Widget: License error.
* SPI\_FETCH\_DATA\_ERROR: Error while fetching the result.
* SPI\_FLOW\_ERROR: Error in the flow process.
* SPI\_HARDWARE\_ERROR: Widget: Hardware error.
* SPI\_INITIALIZATION\_ERROR: Initialization error.
* SPI\_MANAGER\_NOT\_INITIALIZED: The managers are null.
* SPI\_NO\_DATA\_ERROR: Input data are null.
* SPI\_OPERATION\_NOT\_CREATED: There is no operation in progress.
* SPI\_RESOURCES\_NOT\_FOUND: The resources zip was not found.
* SPI\_SETTINGS\_PERMISSION\_ERROR: Widget: Permission error.
* SPI\_TEMPLATE\_ERROR:
* SPI\_TIMEOUT: Timeout in the process.
* SPI\_UNEXPECTED\_CAPTURE\_ERROR: Widget: Capture error.
* SPI\_UNKNOWN\_ERROR: Unknown error.
* SPI\_WIDGET\_RESULT\_DATA\_ERROR: Error in the widget's output data.

</details>
