> 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-nfc.md).

# NFC capture

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

Face Capture is performed with the ***NFC Component***.

This component is responsible for reading the NFC of identity documents and passports. Its main processes are:

* Internal management of the NFC sensor.
* Permission management.
* Document analysis.
* Progress analysis.
* Assistant in the reading processes.
* Return of all possible information to read
* Return of images when available for reading

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

The specific dependency for the component is:

```kts
implementation "com.facephi.androidsdk:nfc_component:$sdk_nfc_component_version"{
      exclude group : "org.bouncycastle", module : "bcprov-jdk15on"
      exclude group : "org.bouncycastle", module : "jetified-bcprov-jdk15on-1.68"
  }
```

In addition, the following must be added in gradle:

```kts
android {
  ...
 packaging {
      resources {
          pickFirsts.add("META-INF/versions/9/OSGI-INF/MANIFEST.MF")
      }
  }
}
```

## Available controllers

| **Controller** | **Description**             |
| -------------- | --------------------------- |
| FNFCController | Main NFC reading controller |

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

Errors will be returned as an 'NfcError' object.

<details>

<summary>List of NFC capture errors:</summary>

* NFC\_APPLICATION\_CONTEXT\_ERROR: The required application context is null.
* NFC\_CANCEL\_BY\_USER: The user has cancelled the process.
* NFC\_CANCEL\_LAUNCH: A general cancellation of the SDK has been made.
* NFC\_COMPONENT\_LICENSE\_ERROR: The component license is not valid.
* NFC\_EMPTY\_LICENSE: The license String is empty.
* NFC\_EXTRACT\_DATA\_ERROR: Error in the extracted data.
* NFC\_FETCH\_DATA\_ERROR: Error in retrieving the result.
* NFC\_FLOW\_ERROR: Error in the flow process.
* NFC\_INITIALIZATION\_ERROR: Initialization error.
* NFC\_LAST\_COMMAND\_EXPECTED: Error in the finalization command
* NFC\_MANAGER\_NOT\_INITIALIZED: The managers are null.
* NFC\_NO\_DATA\_ERROR: The input data is null or no result has been received from the reading.
* NFC\_ERROR: General error
* NFC\_ERROR\_DATA: Error in the input data
* NFC\_ERROR\_DISABLED: NFC disabled
* NFC\_ERROR\_ILLEGAL\_ARGUMENT: NFC with an incorrect tag
* NFC\_ERROR\_IO: Input/output error
* NFC\_ERROR\_NOT\_SUPPORTED: NFC not supported
* NFC\_ERROR\_TAG\_LOST: Connection lost
* NFC\_OPERATION\_NOT\_CREATED: There is no operation in progress.
* NFC\_TIMEOUT: Timeout in the process.

</details>

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

In case of success, `data` contains a `NfcResult` with the data read from the document, available images, security data, and cryptographic validations.

Within `NfcResult.nfcValidations`, the result includes:

* `chipAuthenticationSupported`: Indicates whether the document chip supports Chip Authentication. The field `chipAuthenticationValidation` stores the validation result when applicable.
