> 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/implement-nfc-wallet/handle-cdcvm.md).

# CDCVMを処理する

## 概要

NFC Wallet SDK は、支払い時にエンドユーザーを認証するための複数の CVM（カード所有者認証方式）をサポートしています。たとえば、CDCCVM、オンライン PIN、署名です。

CDCVM（Consumer Device カード所有者認証方式）は、デバイスに依存して確認を行う CVM です。 **エンドユーザー** NFC 支払いの前に。

ほとんどの NFC Wallet プログラムは **CDCVM**。CDCVM はデバイスのユーザー認証に依存します。

このセクションでは、NFC Wallet SDK が CDCVM として Android の安全なデバイスのロック解除方法に依存していることを説明します。

### CDCVM Android（デバイスのロック解除）

Android 用 NFC Wallet SDK は、CDCVM に Android の安全なロック画面を使用します。次をサポートしています：

* **生体認証**：指紋や顔などの強力な生体認証情報。
* **デバイス認証情報（keyguard）**：PIN、パターン、またはパスワード。

{% hint style="info" %}
NFC Wallet は Android Keystore のユーザー認証を使用します。参照： [Android Keystore のユーザー認証](https://developer.android.com/privacy-and-security/keystore#UserAuthentication).
{% endhint %}

### 推奨事項

統合の早い段階で CDCVM を処理します：

* ウォレット登録またはトークン化を開始する前に、デバイスの CDCVM 機能を確認してください。
* 必要に応じて、エンドユーザーに安全なロック画面を有効にするよう促します。

{% hint style="warning" %}

### NFC デバイスの機能チェック

次に記載されているとおり、デバイスが HCE をサポートしていることを確認します： [NFC 機能を宣言する](/nfc-wallet-sdk-android/ja/get-started/configuration/3.-application-manifest-file.md#declare-nfc-features)。この確認は、アプリケーションのインストール時（Google Play のデバイス フィルタリング）または実行時に行えます。

実行時チェックを使用する場合、サポートされていないデバイスでは NFC Wallet の機能を非表示にします。
{% endhint %}

## SDK 連携

### デバイスの CDCVM 機能を確認する

使用する `DeviceCVM有効性Checker.checkDevice有効性` デバイスの機能を確認するために使用します。

次を返します： `DeviceCVM有効性Result`。これを使用して、生体認証とキーガードのサポートを評価します。

このチェックは次の後に実行します： [NFC Wallet SDK を初期化する](/nfc-wallet-sdk-android/ja/get-started/configuration/4.-initialize-the-nfc-wallet-sdk.md)、そしてウォレット登録またはトークン化を開始する前に。

#### 生体認証のサポートを確認する

呼び出します `DeviceCVM有効性Result.getBiometricsSupport`.

次を返します `BiometricSupport.SUPPORTED` 生体認証 CDCVM が利用可能な場合。生体認証がサポートされていない場合の可能なエラーについては、下の表を確認してください。

<details>

<summary>生体認証有効性エラー</summary>

| 結果                               | 説明                                                      |
| -------------------------------- | ------------------------------------------------------- |
| ANDROID\_VERSION\_NOT\_SUPPORTED | デバイスで Android 6.0（API レベル 23）より前のバージョンが実行されている場合に返されます。 |
| NO\_FINGERPRINT\_SENSOR          | デバイスで利用可能な生体認証センサーがない場合に返されます。                          |
| NO\_FINGERPRINT\_ENROLLED        | エンドユーザーがデバイスに生体認証を登録していない場合に返されます。                      |
| PERMISSION\_NOT\_GRANTED         | 必要な生体認証権限がマニフェストにない場合に返されます。                            |
| SECURE\_LOCK\_NOT\_PRESENTED     | デバイスで安全なロック画面が有効になっていない場合に返されます。                        |

</details>

#### デバイスのキーガード サポートを確認する

呼び出します `DeviceCVM有効性Result.getDeviceKeyguardSupport`.

次を返します `DeviceKeyguardSupport.SUPPORTED` デバイスのキーガード CDCVM が利用可能な場合。キーガードがサポートされていない場合の可能なエラーについては、下の表を確認してください。

<details>

<summary>デバイス キーガード有効性エラー</summary>

| 結果                               | 説明                                                      |
| -------------------------------- | ------------------------------------------------------- |
| ANDROID\_VERSION\_NOT\_SUPPORTED | デバイスで Android 6.0（API レベル 23）より前のバージョンが実行されている場合に返されます。 |
| SECURE\_LOCK\_NOT\_PRESENTED     | デバイスで PIN、パターン、またはパスワードが有効になっていない場合に返されます。              |

</details>

### 実装例

```java
// CDCVM を選択するためのデバイスの有効性を確認
DeviceCVM有効性Result result =
        DeviceCVM有効性Checker.checkDeviceEligibility(getApplicationContext());

if(result.getBiometricsSupport() == BiometricsSupport.SUPPORTED) {
    // 生体認証がサポートされています
    // ...
}
else if(result.getDeviceKeyguardSupport() == DeviceKeyguardSupport.SUPPORTED){
    // 生体認証がサポートされていない場合は、Device KeyGuard を使用する必要があります。
    // デバイスのキーガードはサポートされています
    // ...
}
else {
    // エラーを記録します。デバイスはサポートされていません
    // またはエンドユーザーが安全なロック画面を有効にしていません
    // エンドユーザーに安全なロック画面を有効にするよう促すことを推奨します
    // ...
}
```


---

# 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/ja/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.
