> 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 manifiesto de la aplicación

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

### Permisos de Android

Declare 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>Habilitar llamadas de red (por ejemplo, inscripción y reabastecimiento de claves de pago).</td></tr><tr><td><code>android.permission.NFC</code></td><td>Requerido</td><td>Habilitar el acceso NFC para el pago sin contacto.</td></tr><tr><td><code>android.permission.USE_BIOMETRIC</code></td><td>Condicional</td><td>Habilitar la autenticación biométrica como CDCVM.</td></tr><tr><td><code>android.permission.USE_FINGERPRINT</code></td><td>Condicional</td><td>Compatibilizar con Android 9 y anteriores al usar biometría como CDCVM.</td></tr></tbody></table>

### Declarar funciones NFC

Para el pago sin contacto, el dispositivo debe soportar:

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

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

Declare ambas funciones como requeridas:

```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 su aplicación en Google Play solo a dispositivos compatibles.
{% endhint %}

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

Si no puede filtrar la compatibilidad de dispositivos en Google Play, verifique el soporte 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 admite NFC ni HCE.
        return false;    
    }
    return true;
}
```

### Habilitar el servicio de comunicación CPS

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

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

### Desactivar copia de seguridad y restauración

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

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

### Ejemplo `AndroidManifest.xml`

Este ejemplo muestra las declaraciones típicas que necesita. Ajuste nombres y metadatos a su aplicación de billetera 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" />

        <!-- Your HCE service (example) -->
        <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.
