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

# 3. アプリケーション マニフェスト ファイル

設定 `AndroidManifest.xml` NFC Wallet SDK が正しく動作するようにします。

### Android の権限

以下の権限をに宣言してください `AndroidManifest.xml`:

<table data-full-width="true"><thead><tr><th width="338.25">Android 権限</th><th width="167.75">要件</th><th>説明</th></tr></thead><tbody><tr><td><code>android.permission.INTERNET</code></td><td>必須</td><td>ネットワーク呼び出しを有効にします（例：登録や支払いキーの補充）。</td></tr><tr><td><code>android.permission.NFC</code></td><td>必須</td><td>非接触決済のための NFC アクセスを有効にします。</td></tr><tr><td><code>android.permission.USE_BIOMETRIC</code></td><td>条件付き</td><td>CDCVM としての生体認証を有効にします。</td></tr><tr><td><code>android.permission.USE_FINGERPRINT</code></td><td>条件付き</td><td>生体認証を CDCVM として使用する場合、Android 9 以前をサポートします。</td></tr></tbody></table>

### NFC 機能の宣言

非接触決済のため、端末は次をサポートしている必要があります：

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

#### オプション A: Google Play でサポートされていないデバイスをフィルタする

両方の機能を必須として宣言：

```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` 宣言により、Google Play 上でアプリが対応デバイスのみにフィルタされます。
{% endhint %}

#### オプション B: インストールを許可し、実行時に確認する

Google Play でデバイス互換性をフィルタできない場合、Android API を使って機能サポートを確認してください：

```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) {
        // 端末は NFC または HCE をサポートしていません。
        return false;    
    }
    return true;
}
```

### CPS 通信サービスを有効にする

敏感なビューでsetFilterTouchesWhenObscured(true) `CPSCommService` を処理するために **CPS** メッセージ通信。

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

### バックアップと復元を無効にする

Android アプリのバックアップと復元を無効にします。

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

### 例 `AndroidManifest.xml`

この例は必要となる典型的な宣言を示します。名前やメタデータはデジタルウォレットアプリに合わせて調整してください。

```xml
<application

    <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" />

    android:allowBackup="false">
        </application>

        <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>

    </manifest>
デフォルトでは、
```

{% hint style="info" %}
HCE サービスの宣言は に記載されます [HCE サービスを実装する](/nfc-wallet-sdk-android/ja/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:

```
GET https://docs.payments.thalescloud.io/nfc-wallet-sdk-android/ja/get-started/configuration/3.-application-manifest-file.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
