> 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). Agents can also search and read this documentation through its [MCP server](https://docs.payments.thalescloud.io/~gitbook/mcp).

# 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 通信サービスを有効にする

有効にする `CPSCommService` 処理する **CPS** メッセージ通信。

```xml
<!-- CPS 通信サービス -->
<service
    android:name="com.gemalto.mfs.mwsdk.provisioning.push.CPSCommService"
    android:enabled="true"
    android:exported="false" />
```

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

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

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

### 例 `AndroidManifest.xml`

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

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

        <!-- あなたの HCE サービス（例） -->
        <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" %}
HCE サービスの宣言については、次で説明します [HCE サービスの実装](https://docs.payments.thalescloud.io/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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
