> 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ウォレットSDKのAPIはAndroidの `Context`.

一部のAPIはNFCウォレットSDKの初期化が完了していることも要求します。

このページでは、APIを早すぎに呼び出した場合に何が起こるかを理解するために使用します。

#### 前提条件の定義

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

参照： [NFCウォレット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`.       |
| `isDefault`          | 必須       | 不要         | 返す `DigitalizedCardErrorCodes.NULL_CONTEXT` とともに `false`.      |
| `setDefault`         | 必須       | 必須         | 返す `DigitalizedCardErrorCodes.SDK_NOT_INITIALIZED` と操作を実行しません。 |
| `isMultiAids`        | 必須       | 不要         | 返す `false`.                                                    |
| `hasAuxiliaryScheme` | 必須       | 不要         | 返す `false`.                                                    |
| `getAllAids`         | 必須       | 不要         | 空の `ArrayList`.                                                |
| `updateAidList`      | 必須       | 不要         | 操作を実行しません。                                                     |

### PaymentBusinessService

| API                                   | SDK構成が必要 | SDKの初期化が必要 | 前提条件が欠けている場合                                                                      |
| ------------------------------------- | -------- | ---------- | --------------------------------------------------------------------------------- |
| `activate`                            | 必須       | 必須         | を返す `errorCode: PaymentServiceErrorCode.PAYMENT_NOT_ALLOWED_SDK_NOT_INITIALIZED`. |
| `startAuthentication`                 | 必須       | 必須         | を返す `errorCode: PaymentServiceErrorCode.PAYMENT_NOT_ALLOWED_SDK_NOT_INITIALIZED`. |
| `getAuthenticationFlowPriorToPayment` | 必須       | 必須         | を返す `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`. |
| `deactivate`                          | 必須       | 必須         | 操作を実行しません。                                                                        |

### EnrollingBusinessService

| API                  | SDK構成が必要 | SDKの初期化が必要 | 前提条件が欠けている場合                                                                                                                      |
| -------------------- | -------- | ---------- | --------------------------------------------------------------------------------------------------------------------------------- |
| `isEnrolled`         | 必須       | 不要         | 返す `EnrollmentStatus.ENROLLMENT_NEEDED`.                                                                                          |
| `continueEnrollment` | 必須       | 必須         | 返す `ProvisioningServiceErrorCodes.NULL_CONTEXT` SDK構成が欠けている場合。返す `ProvisioningServiceErrorCodes.SDK_NOT_INITIALIZED` 初期化が欠けている場合。 |
| `enroll`             | 必須       | 必須         | 返す `ProvisioningServiceErrorCodes.NULL_CONTEXT` SDK構成が欠けている場合。返す `ProvisioningServiceErrorCodes.SDK_NOT_INITIALIZED` 初期化が欠けている場合。 |

### ProvisioningBusinessService

| API                                   | SDK構成が必要 | SDKの初期化が必要 | 前提条件が欠けている場合                                                        |
| ------------------------------------- | -------- | ---------- | ------------------------------------------------------------------- |
| `processIncomingMessage`              | 必須       | 必須         | を返す `errorCode: ProvisioningServiceErrorCodes.SDK_NOT_INITIALIZED`. |
| `sendActivationCode`                  | 必須       | 不要         | を返す `errorCode: ProvisioningServiceErrorCodes.NULL_CONTEXT`.        |
| `sendRequestForReplenishment`         | 必須       | 不要         | を返す `errorCode: ProvisioningServiceErrorCodes.NULL_CONTEXT`.        |
| `updatePushToken`                     | 必須       | 不要         | を返す `errorCode: ProvisioningServiceErrorCodes.NULL_CONTEXT`.        |
| `getAccessToken`                      | 必須       | 不要         | を返す `errorCode: ProvisioningServiceErrorCodes.NULL_CONTEXT`.        |
| `sendRequestForODACertificateRenewal` | 必須       | 不要         | を返す `errorCode: ProvisioningServiceErrorCodes.NULL_CONTEXT`.        |

### WalletSecureEnrollmentService

| API                           | SDK構成が必要 | SDKの初期化が必要                   | 前提条件が欠けている場合                                                                                                                                     |
| ----------------------------- | -------- | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| `getState`                    | 必須       | 不要                           | 返す `null`.                                                                                                                                       |
| `startWalletSecureEnrollment` | 必須       | 必須（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.
