> 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/help/sdk-api-requirements.md).

# SDK API要件

### 概要

NFC Wallet SDK のほとんどの API には Android の `Context`.

一部の API では、NFC Wallet SDK の初期化が完了していることも必要です。

API を早すぎるタイミングで呼び出した場合に何が起こるかを理解するために、このページを使用してください。

#### 前提条件の定義

* **SDK の構成**: SDK には Android の `Context`.
  * これは、次を呼び出した後に利用可能になります `SDKInitializer.INSTANCE.configure(...)`.
  * これは、次を開始した後にも利用可能になります `SDKInitializer.INSTANCE.initialize(...)`.
* **SDK の初期化**: `SDKInitializer.INSTANCE.initialize(...)` が正常に完了しました。

参照 [NFC Wallet SDK を初期化する](/nfc-wallet-sdk-android/ja/get-started/configuration/4.-initialize-the-nfc-wallet-sdk.md).

{% hint style="warning" %}
一部の API では、実行時例外（たとえば、 `NullPointerException`）を、前提条件が欠けている場合にスローすることがあります。
{% endhint %}

### DigitalizedCardManager

| API                    | SDK の構成が必要 | SDK の初期化が必要               | 前提条件が不足している場合                                                                                                                                |
| ---------------------- | ---------- | ------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| `getAllCards`          | 必須         | 不要                        | 返す `DigitalizedCardErrorCodes.NULL_CONTEXT` 空の `String[]`.                                                                                   |
| `getDefault`           | 必須         | 不要                        | 返す `DigitalizedCardErrorCodes.NULL_CONTEXT` 空の `String`.                                                                                     |
| `getDigitalizedCardId` | 必須         | 不要                        | 返す `null`.                                                                                                                                   |
| `getTokenizedCardId`   | 必須         | 不要                        | 返す `null`.                                                                                                                                   |
| `unsetDefaultCard`     | 必須         | 必須                        | 返す `DigitalizedCardErrorCodes.SDK_NOT_INITIALIZED` また、処理は実行されません。                                                                            |
| `getTokenSyncSchedule` | 必須         | 必須                        | スローする例外 `NullPointerException`.                                                                                                              |
| `isTokenSyncAllowed`   | 必須         | 必須                        | スローする例外 `NullPointerException`.                                                                                                              |
| `invokeTokenSync`      | 必須         | 必須（Mobile Gateway が初期化済み） | スローする例外 `IllegalStateException` CPS が初期化されていない場合。返す値は `TokenSyncErrorCode.TOKEN_SYNC_ERROR_SDK_NOT_INITIALIZED` Mobile Gateway が初期化されていない場合。 |

### DigitalizedCard

| API              | SDK の構成が必要 | SDK の初期化が必要 | 前提条件が不足している場合                                                     |
| ---------------- | ---------- | ----------- | ----------------------------------------------------------------- |
| `getCardDetails` | 必須         | 不要          | 返す `DigitalizedCardErrorCodes.NULL_CONTEXT` と `null`.             |
| `getCardState`   | 必須         | 不要          | 返す `DigitalizedCardErrorCodes.NULL_CONTEXT` と `null`.             |
| `デフォルトかどうか`      | 必須         | 不要          | 返す `DigitalizedCardErrorCodes.NULL_CONTEXT` と `false`.            |
| `デフォルトに設定`       | 必須         | 必須          | 返す `DigitalizedCardErrorCodes.SDK_NOT_INITIALIZED` また、処理は実行されません。 |
| `複数 AID 対応かどうか`  | 必須         | 不要          | 返す `false`.                                                       |
| `補助スキームがあるかどうか`  | 必須         | 不要          | 返す `false`.                                                       |
| `getAllAids`     | 必須         | 不要          | 空の `ArrayList`.                                                   |
| `updateAidList`  | 必須         | 不要          | 操作は実行されません。                                                       |

### PaymentBusinessService

| API                             | SDK の構成が必要 | SDK の初期化が必要 | 前提条件が不足している場合                                                                      |
| ------------------------------- | ---------- | ----------- | ---------------------------------------------------------------------------------- |
| `有効化`                           | 必須         | 必須          | 次を返す `errorCode: PaymentServiceErrorCode.PAYMENT_NOT_ALLOWED_SDK_NOT_INITIALIZED`. |
| `startAuthentication`           | 必須         | 必須          | 次を返す `errorCode: PaymentServiceErrorCode.PAYMENT_NOT_ALLOWED_SDK_NOT_INITIALIZED`. |
| `支払い前の認証フローを取得`                 | 必須         | 必須          | 次を返す `errorCode: PaymentServiceErrorCode.PAYMENT_NOT_ALLOWED_SDK_NOT_INITIALIZED`. |
| `generateQRCodePaymentData`     | 必須         | 必須          | 次を返す `errorCode: PaymentServiceErrorCode.PAYMENT_NOT_ALLOWED_SDK_NOT_INITIALIZED`. |
| `generateApplicationCryptogram` | 必須         | 必須          | 次を返す `errorCode: PaymentServiceErrorCode.PAYMENT_NOT_ALLOWED_SDK_NOT_INITIALIZED`. |
| `無効化`                           | 必須         | 必須          | 操作は実行されません。                                                                        |

### EnrollingBusinessService

| API        | SDK の構成が必要 | SDK の初期化が必要 | 前提条件が不足している場合                                                                                                                   |
| ---------- | ---------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------- |
| `登録済みかどうか` | 必須         | 不要          | 返す `EnrollmentStatus.ENROLLMENT_NEEDED`.                                                                                        |
| `登録を続行`    | 必須         | 必須          | 返す `ProvisioningServiceErrorCodes.NULL_CONTEXT` SDK の構成がない場合。返す値は `ProvisioningServiceErrorCodes.SDK_NOT_INITIALIZED` 初期化がない場合。 |
| `登録`       | 必須         | 必須          | 返す `ProvisioningServiceErrorCodes.NULL_CONTEXT` SDK の構成がない場合。返す値は `ProvisioningServiceErrorCodes.SDK_NOT_INITIALIZED` 初期化がない場合。 |

### ProvisioningBusinessService

| API                      | SDK の構成が必要 | SDK の初期化が必要 | 前提条件が不足している場合                                                        |
| ------------------------ | ---------- | ----------- | -------------------------------------------------------------------- |
| `processIncomingMessage` | 必須         | 必須          | 次を返す `errorCode: ProvisioningServiceErrorCodes.SDK_NOT_INITIALIZED`. |
| `sendActivationCode`     | 必須         | 不要          | 次を返す `errorCode: ProvisioningServiceErrorCodes.NULL_CONTEXT`.        |
| `補充リクエストを送信`             | 必須         | 不要          | 次を返す `errorCode: ProvisioningServiceErrorCodes.NULL_CONTEXT`.        |
| `プッシュトークンを更新`            | 必須         | 不要          | 次を返す `errorCode: ProvisioningServiceErrorCodes.NULL_CONTEXT`.        |
| `アクセストークンを取得`            | 必須         | 不要          | 次を返す `errorCode: ProvisioningServiceErrorCodes.NULL_CONTEXT`.        |
| `ODA 証明書更新リクエストを送信`      | 必須         | 不要          | 次を返す `errorCode: ProvisioningServiceErrorCodes.NULL_CONTEXT`.        |

### WalletSecureEnrollmentService

| API                            | SDK の構成が必要 | SDK の初期化が必要               | 前提条件が不足している場合                                                                                                                                    |
| ------------------------------ | ---------- | ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| `状態を取得`                        | 必須         | 不要                        | 返す `null`.                                                                                                                                       |
| `Wallet Secure Enrollment を開始` | 必須         | 必須（Mobile Gateway が初期化済み） | 返す `WalletSecureEnrollmentErrorCodes.WSE_CPS_COMPONENT_NOT_INITIALIZED` または `WalletSecureEnrollmentErrorCodes.WSE_MG_COMPONENT_NOT_INITIALIZED`. |


---

# 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/help/sdk-api-requirements.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.
