> 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/get-started/configuration/3.-application-manifest-file.md).

# 3. Archivo de manifiesto de la aplicación

Configurar `AndroidManifest.xml` para que el SDK de NFC Wallet pueda ejecutarse correctamente.

### Permisos de Android

Declara los siguientes permisos en `AndroidManifest.xml`:

<table data-full-width="true"><thead><tr><th width="338.25">Permiso de Android</th><th width="167.75">Requisito</th><th>Descripción</th></tr></thead><tbody><tr><td><code>android.permission.INTERNET</code></td><td>Requerido</td><td>Habilita las llamadas de red (por ejemplo, el alta y la reposición de la clave de pago).</td></tr><tr><td><code>android.permission.NFC</code></td><td>Requerido</td><td>Habilita el acceso NFC para pagos sin contacto.</td></tr><tr><td><code>android.permission.USE_BIOMETRIC</code></td><td>Condicional</td><td>Habilita la autenticación biométrica como CDCVM.</td></tr><tr><td><code>android.permission.USE_FINGERPRINT</code></td><td>Condicional</td><td>Da soporte a Android 9 y anteriores al usar biometría como CDCVM.</td></tr></tbody></table>

### Declarar características NFC

Para el pago sin contacto, el dispositivo debe ser compatible con:

* `android.hardware.nfc`
* `android.hardware.nfc.hce`

#### Opción A: Filtrar los dispositivos no compatibles en Google Play

Declara ambas funciones como obligatorias:

```xml
<uses-feature android:name="android.hardware.nfc" android:required="true" />
<uses-feature android:name="android.hardware.nfc.hce" android:required="true" />
```

{% hint style="warning" %}
`uses-feature` las declaraciones filtran tu aplicación en Google Play para que solo aparezca en dispositivos compatibles.
{% endhint %}

#### Opción B: Permitir la instalación y comprobar en tiempo de ejecución

Si no puedes filtrar la compatibilidad de dispositivos en Google Play, comprueba la compatibilidad de funciones usando las API de Android:

```java
public static boolean doesDeviceSupportHCE(@NonNull final Context context) {
    final PackageManager pm = context.getPackageManager();
    final boolean hasNfc = pm.hasSystemFeature(PackageManager.FEATURE_NFC);
    final boolean supportsHce = pm.hasSystemFeature(PackageManager.FEATURE_NFC_HOST_CARD_EMULATION);
    
    if (!hasNfc || !supportsHce) {
        // El dispositivo no es compatible con NFC o HCE.
        return false;    
    }
    return true;
}
```

### Habilitar el servicio de comunicación CPS

Habilita `CPSCommService` para procesar **CPS** la comunicación de mensajes.

```xml
<!-- Servicio de comunicación CPS -->
<service
    android:name="com.gemalto.mfs.mwsdk.provisioning.push.CPSCommService"
    android:enabled="true"
    android:exported="false" />
```

### Deshabilitar la copia de seguridad y la restauración

Deshabilita la copia de seguridad y la restauración de la aplicación de Android.

```xml
<application
    android:allowBackup="false">
```

### Ejemplo `AndroidManifest.xml`

Este ejemplo muestra las declaraciones típicas que necesitas. Ajusta los nombres y los metadatos a tu aplicación de cartera digital.

```xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.NFC" />
    <uses-permission android:name="android.permission.USE_BIOMETRIC" />
    <uses-permission android:name="android.permission.USE_FINGERPRINT" />

    <uses-feature android:name="android.hardware.nfc" android:required="true" />
    <uses-feature android:name="android.hardware.nfc.hce" android:required="true" />

    <application
        android:allowBackup="false">

        <service
            android:name="com.gemalto.mfs.mwsdk.provisioning.push.CPSCommService"
            android:enabled="true"
            android:exported="false" />

        <!-- Tu servicio HCE (ejemplo) -->
        <service
            android:name=".payment.contactless.YourHostApduService"
            android:exported="true"
            android:permission="android.permission.BIND_NFC_SERVICE">
            <intent-filter>
                <action android:name="android.nfc.cardemulation.action.HOST_APDU_SERVICE" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>

            <meta-data
                android:name="android.nfc.cardemulation.host_apdu_service"
                android:resource="@xml/apduservice" />
        </service>

    </application>
</manifest>
```

{% hint style="info" %}
La declaración del servicio HCE se describirá en [Implementar el servicio HCE](/nfc-wallet-sdk-android/es/implement-nfc-wallet/make-payment/implement-contactless-payments/1.-implement-hce-service.md)
{% endhint %}


---

# 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/get-started/configuration/3.-application-manifest-file.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.
