> For the complete documentation index, see [llms.txt](https://docs.payments.thalescloud.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.payments.thalescloud.io/nfc-wallet-sdk-android/es/implement-nfc-wallet/handle-cdcvm.md).

# Gestionar CDCVM

## Resumen

NFC Wallet SDK admite múltiples CVM (método de verificación del titular de la tarjeta) para autenticar al usuario final durante el pago, como CDCCVM, PIN en línea y firma.

CDCVM (Consumer Device Cardholder Verification Method) es un CVM que se basa en el dispositivo para verificar al **usuario final** antes de un pago NFC.

La mayoría de los programas NFC Wallet usan **CDCVM**. CDCVM se basa en la autenticación del usuario del dispositivo.

En esta sección, explicamos que NFC Wallet SDK se basa en el método seguro de desbloqueo del dispositivo de Android como CDCVM.

### CDCVM Android (desbloqueo del dispositivo)

NFC Wallet SDK para Android usa la pantalla de bloqueo segura de Android para CDCVM. Admite:

* **Biométrico**: credenciales biométricas fuertes, como huella dactilar o rostro.
* **Credenciales del dispositivo (keyguard)**: PIN, patrón o contraseña.

{% hint style="info" %}
NFC Wallet usa la autenticación de usuario de Android Keystore. Ver [Autenticación de usuario de Android Keystore](https://developer.android.com/privacy-and-security/keystore#UserAuthentication).
{% endhint %}

### Recomendaciones

Maneja CDCVM al inicio de tu integración:

* Verifica las capacidades CDCVM del dispositivo antes de iniciar el registro de la billetera o la tokenización.
* Solicita al usuario final que habilite una pantalla de bloqueo segura cuando sea necesario.

{% hint style="warning" %}

## Verificación de la capacidad del dispositivo NFC

Verifica que tu dispositivo admita HCE como se indica en [Declarar funciones NFC](/nfc-wallet-sdk-android/es/get-started/configuration/3.-application-manifest-file.md#declare-nfc-features). Puedes realizar la verificación durante la instalación de la aplicación (filtrado de dispositivos de Google Play) o en tiempo de ejecución.

Si usas una verificación en tiempo de ejecución, oculta las funciones de NFC Wallet para los dispositivos no compatibles.
{% endhint %}

## Integración del SDK

### Verificar las capacidades CDCVM del dispositivo

Usa `DeviceCVMEligibilityChecker.checkDeviceEligibility` para verificar las capacidades del dispositivo.

Devuelve un `DeviceCVMEligibilityResult`. Úsalo para evaluar la compatibilidad biométrica y de keyguard.

Ejecuta esta verificación después de [inicializar el SDK de NFC Wallet](/nfc-wallet-sdk-android/es/get-started/configuration/4.-initialize-the-nfc-wallet-sdk.md)y antes de iniciar el registro de la billetera o la tokenización.

#### Verificar la compatibilidad biométrica

Llama a `DeviceCVMEligibilityResult.getBiometricsSupport`.

Devuelve `BiometricSupport.SUPPORTED` cuando la CDCVM biométrica está disponible. Consulta el posible error en caso de que la biometría no sea compatible en la tabla siguiente.

<details>

<summary>Error de elegibilidad biométrica</summary>

| Resultado                        | Descripción                                                                                     |
| -------------------------------- | ----------------------------------------------------------------------------------------------- |
| ANDROID\_VERSION\_NOT\_SUPPORTED | Devuelto cuando el dispositivo ejecuta una versión de Android anterior a 6.0 (nivel de API 23). |
| NO\_FINGERPRINT\_SENSOR          | Devuelto cuando no hay ningún sensor biométrico disponible en el dispositivo.                   |
| NO\_FINGERPRINT\_ENROLLED        | Devuelto cuando el usuario final no ha registrado datos biométricos en el dispositivo.          |
| PERMISSION\_NOT\_GRANTED         | Devuelto cuando falta en el manifiesto el permiso biométrico requerido.                         |
| SECURE\_LOCK\_NOT\_PRESENTED     | Devuelto cuando no hay habilitada ninguna pantalla de bloqueo segura en el dispositivo.         |

</details>

#### Verificar la compatibilidad de keyguard del dispositivo

Llama a `DeviceCVMEligibilityResult.getDeviceKeyguardSupport`.

Devuelve `DeviceKeyguardSupport.SUPPORTED` cuando la CDCVM de keyguard del dispositivo está disponible. Consulta el posible error en caso de que keygard no sea compatible en la tabla siguiente.

<details>

<summary>Error de elegibilidad de keyguard del dispositivo</summary>

| Resultado                        | Descripción                                                                                     |
| -------------------------------- | ----------------------------------------------------------------------------------------------- |
| ANDROID\_VERSION\_NOT\_SUPPORTED | Devuelto cuando el dispositivo ejecuta una versión de Android anterior a 6.0 (nivel de API 23). |
| SECURE\_LOCK\_NOT\_PRESENTED     | Devuelto cuando no hay habilitado en el dispositivo ningún PIN, patrón o contraseña.            |

</details>

### Ejemplo de implementación

```java
// Verificar la elegibilidad del dispositivo para elegir CDCVM
DeviceCVMEligibilityResult result =
        DeviceCVMEligibilityChecker.checkDeviceEligibility(getApplicationContext());

if(result.getBiometricsSupport() == BiometricsSupport.SUPPORTED) {
    // La biometría es compatible
    // ...
}
else if(result.getDeviceKeyguardSupport() == DeviceKeyguardSupport.SUPPORTED){
    // Si la biometría no es compatible, se debe usar Device KeyGuard.
    // El keyguard del dispositivo es compatible
    // ...
}
else {
    // Registrar error, el dispositivo no es compatible
    // o el usuario final no ha habilitado la pantalla de bloqueo segura
    // Recomendamos solicitar al usuario final que habilite una pantalla de bloqueo segura
    // ...
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.payments.thalescloud.io/nfc-wallet-sdk-android/es/implement-nfc-wallet/handle-cdcvm.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
