> 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-de-huellas.md).

# Fingerprint Capture

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

Fingerprint Capture is performed through the **Phingers Component**.

This component is responsible for capturing the user's fingerprints (*fingerprints*) and extracting the associated biometric templates. Its main processes are:

* Internal camera and permission management.
* Different extraction modes: full hand (four fingers without thumb), thumb, or individual fingers.
* Integrated liveness detection.
* Guided assistance during the capture process.
* Generation of biometric templates, images, and quality metrics.

***

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

The specific dependency for the component is:

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

***

## Available controllers <a href="#id-3-controladores-disponibles" id="id-3-controladores-disponibles"></a>

| **Controller**       | **Description**                     |
| -------------------- | ----------------------------------- |
| PhingersTFController | Main fingerprint capture controller |

***

## Receiving errors <a href="#id-61-recepcion-de-errores" id="id-61-recepcion-de-errores"></a>

* PHG\_ACTIVITY\_RESULT\_ERROR: The activity result is incorrect.
* PHG\_ACTIVITY\_RESULT\_MSG\_ERROR: The activity result message is incorrect.
* PHG\_APPLICATION\_CONTEXT\_ERROR: The application context is null.
* PHG\_CANCEL\_BY\_USER: The user has canceled the process.
* PHG\_CANCEL\_LAUNCH: General SDK cancellation.
* PHG\_COMPONENT\_LICENSE\_ERROR: The component license is not valid.
* PHG\_EMPTY\_LICENSE: The license string is empty.
* PHG\_FETCH\_DATA\_ERROR: Error collecting the result.
* FLOW\_ERROR: Error in the flow process.
* PHG\_INITIALIZATION\_ERROR: Initialization error.
* PHG\_INTERNAL\_ERROR: Internal error.
* PHG\_LOW\_QUALITY: Low image quality.
* PHG\_MANAGER\_NOT\_INITIALIZED: The managers are null or not initialized.
* PHG\_NO\_DATA\_ERROR: No data has been received from the capture.
* PHG\_OPERATION\_NOT\_CREATED: There is no operation in progress.
* PHG\_PERMISSION\_DENIED: The user has denied the permissions.
* PHG\_AUTOFOCUS\_FAILURE: Autofocus failure.
* PHG\_CAMERA\_FAILURE: Camera failure.
* PHG\_CAPTURE\_FAILURE: Capture failure.
* PHG\_CONFIGURATION\_FAILURE: Configuration error.
* PHG\_FINGERPRINT\_CAPTURE\_FAILURE: Failure in Fingerprint Capture.
* PHG\_FINGERPRINT\_TEMPLATE\_IO\_ERROR: Template IO error.
* PHG\_LICENSING\_FAILURE: License failure.
* PHG\_LIVENESS\_FAILURE: Error in the liveness check.
* PHG\_NO\_FINGERS\_DETECTED: No fingerprints have been detected.
* PHG\_UNIQUE\_USER\_ID\_NOT\_SPECIFIED: User not specified.
* PHG\_TIMEOUT: Timeout in the process.
* PHG\_FLOW\_VIDEO\_RECORDING\_ERROR: Error in the flow's Video Recording.
* PHG\_FLOW\_TRACKING\_ERROR: Tracking error in the flow.
* PHG\_TRACKING\_STEP\_ERROR: Error in the tracking step.

***

## Advanced configuration <a href="#id-7-configuracion-avanzada" id="id-7-configuracion-avanzada"></a>

The controller uses `PhingersConfigurationData` to adjust the capture behavior. In addition to the parameters for finger selection, quality, liveness, or help screens, optional fields can be provided for activation and Widget traceability:

* `licenseKey`: License key passed to the Phingers TF Widget.
* `product`: Product associated with activation or licensing.
* `operationId`: Operation identifier sent to the Widget.

The configuration also allows enabling local Video Recording of the capture:

* `videoRecordingEnabled`: Enables local recording during capture. By default `false`.
* `videoRecordingDirectoryPath`: Optional destination directory for the generated MP4.
* `videoRecordingFileName`: Optional file name.
* `videoRecordingQuality`: Quality `LOW`, `MEDIUM` or `HIGH`. By default `MEDIUM`.

## Reception of the correct result - *data* <a href="#id-8-recepcion-del-resultado-correcto-data" id="id-8-recepcion-del-resultado-correcto-data"></a>

If successful, `data` contains a `PhingersResult` with the captured fingerprints, images *slap* when applicable, and the average liveness (`livenessScore`).

When local recording is enabled and the Widget generates an MP4 file, `PhingersResult.recording` can return:

* `path`: Full path of the generated file.
* `fileName`: Video file name.
* `mimeType`: File MIME type. By default `video/mp4`.
* `sizeBytes`: File size in bytes, when the Widget reports it.
* `durationMs`: Video duration in milliseconds, when the Widget reports it.

***
