> 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/classic-push-provisioning/ja/gaido/toraburushtingu/android.md).

# Android

### ログの取得中 <a href="#retrieving-logs" id="retrieving-logs"></a>

#### Logcat の前提条件 <a href="#prerequisites-for-logcat" id="prerequisites-for-logcat"></a>

Android デバイスからログファイルを取得する前に、次の設定を完了してください：

* ホストシステムに Android Debug Bridge (ADB) がインストールされていること。
* テスト対象デバイスで USB デバッグオプションが有効になっていること。
* Android デバイスが USB ケーブルでホストシステムに接続され、USB ドライバーがインストールされていること。

設定を確認するには、次のコマンドを実行します：

```
adb devices
```

次のような出力が表示されれば、ADB がデバイスに到達できることを示します：

```
List of devices attached228b0e100d047ece device
```

そうでない場合は、上に示した前提条件が満たされているか確認してください。

これらの手順を扱ったオンラインガイドが存在します。

エンドツーエンドのセットアップについては、次を参照してください <https://support.citrix.com/article/CTX232375>.

> <i class="fa-exclamation-circle">:exclamation-circle:</i>
>
> #### 警告 <a href="#warning" id="warning"></a>
>
> 一部のデバイスでは、ベンダー固有のメニューからデバイスログを有効にする必要があります。
>
> たとえば、Huawei デバイスではダイヤルして開くメニューの下にあります `*#*#2846579#*#*`。詳細については、次を参照してください <https://stackoverflow.com/questions/18124334/huawei-logcat-not-showing-the-log-for-my-app>.

#### ログを取得するための推奨手順 <a href="#recommended-steps-for-capturing-logs" id="recommended-steps-for-capturing-logs"></a>

* コマンドプロンプトを開き、デバイス上のすべてのログバッファをクリアします：

```
adb logcat -b all -c
```

* ログのキャプチャを開始します：

```
adb logcat> TestLogFileName.txt
```

* ユースケースを実行します。
* 押します `CTRL+C` コマンドプロンプトでログのキャプチャを停止するには。
* 見つけます `TestLogFileName.txt` 手順 2 を実行したディレクトリにあります。

> <i class="fa-info-circle">:info-circle:</i>
>
> #### SDK バリアントとログフィルタ <a href="#sdk-variant-and-log-filters" id="sdk-variant-and-log-filters"></a>
>
> * 最も詳細なログを取得するには、次を使用するアプリビルドを使用してください： `debug` SDK バリアント。
> * 回避してください [ログフィルタ](https://developer.android.com/studio/command-line/logcat#filteringOutput) キャプチャされるメッセージを制限するもの。これらのメッセージはトラブルシューティングに有用です。
> * キャプチャ時間を制限してログを小さく保ちます。ユースケースの直前にキャプチャを開始し、完了直後に停止してください。

#### Google Pay ログの取得 <a href="#retrieving-google-pay-logs" id="retrieving-google-pay-logs"></a>

1. Google にテストアカウントを許可リストに追加するよう依頼してください。次を使用してリクエストを送信します： [provisioning contact form](https://support.google.com/faqs/contact/pp_api_general?authuser=1).
2. Google がアクセスを許可した後、ログを次でフィルタします [Logcat](https://developer.android.com/studio/debug/am-logcat) を使用して `TapAndPay`.

#### Samsung Pay ログの取得 <a href="#retrieving-samsung-pay-logs" id="retrieving-samsung-pay-logs"></a>

Samsung Pay API のログを取得するには、次を構成します： **Debug API key** 次に説明するように [Issuer onboarding](/classic-push-provisioning/ja/gaido/ishuanoonbdingu.md).

### サーバーエラー <a href="#server-errors" id="server-errors"></a>

サーバー関連のエラーを受け取った場合、API リクエスト ID を次から取得できることがあります： `TPCSDKException`の `getRequestId()` メソッド。サポートチームに問題を報告する際はこのリクエスト ID を使用してください。

### 一般的なエラー <a href="#common-errors" id="common-errors"></a>

#### モードが不適切 <a href="#incorrect-mode" id="incorrect-mode"></a>

このエラーはデバイスが誤ったモードにあると発生します。デバイスを次のモードから切り替えてください： `SANDBOX` モードへ `PROD` モードへ。詳細は次を参照してください： [Sandbox testing](/classic-push-provisioning/ja/gaido/sandobokkusutesuto.md)。エラーは通常次のようになります：

```
Internal Error: CheckEligibility error in CardNetworkTokenService vendor layer: code: 14
```

#### 無効なフィールド長 - cardholderName <a href="#invalid-field-length---cardholdername" id="invalid-field-length---cardholdername"></a>

このエラーは Mastercard 決済ネットワークで、次の長さが許容最大を超えたときに発生します： `cardHolderName` の最大長は Mastercard ポリシーにより 27 文字です。詳細は次を参照してください： `cardHolderName` の最大長は 27 文字です（Mastercard ポリシーによる）。詳細は次の [Mastercard documentation](https://developer.mastercard.com/mdes-pre-digitization/documentation/use_case/issuer-tokenization/#reference-api-implementation)。エラーは通常次のようになります：

{% code overflow="wrap" %}

```
Invalid Field Length - cardholderName"Internal Error: CheckEligibility error in CardNetworkTokenService vendor layer: code: 3
```

{% endcode %}

#### API キー認証情報が不正 <a href="#incorrect-credentials-of-api-key" id="incorrect-credentials-of-api-key"></a>

このエラーは、プロジェクトが決済ネットワーク側で構成されていないことを示します。プロジェクトを決済ネットワークで構成してください。エラーは通常次のように見えます：

```
card_network_token_error_code: "AUTHENTICATION_ERROR"
```

#### Google Pay 利用不可 <a href="#googlepay-unavailable" id="googlepay-unavailable"></a>

次のいずれかの条件を満たすと、このエラーが発生します：

* デバイスが [Google Wallet を利用できる国にある](https://support.google.com/wallet/answer/12060037#zippy=%2Cuse-google-wallet-for-payments).
* アプリケーションがエミュレータ上で実行されている。
* デバイスに Google Play サービスがインストールされていない。Google Play サービスは [ダウンロードできます](https://play.google.com/store/apps/details?id=com.google.android.gms\&hl=en\&gl=US).
* アプリケーションのパッケージ名が Google の Push Provisioning API を使用するよう登録されていない。詳細は次を参照してください： [Google のドキュメント](https://developers.google.com/pay/issuers/apis/push-provisioning/android/allowlist) で詳細情報。
* アプリケーションの [フィンガープリント](https://developers.google.com/pay/issuers/apis/push-provisioning/android/allowlist#how_to_get_your_apps_fingerprint) が Google の許可リスト上のものと比較して変更されています。
* Sandbox が一時的に利用できない場合があります。数日待って断続的に再試行してください。問題が継続する場合、またはそれが `PPROD` または `PROD`で発生する場合は、次に連絡してください： <pushprov-api-support@google.com>.

#### R.txt の重複エントリによるコンパイルエラー `これは通常、アプリケーションが次を設定しているときに発生します：` <a href="#compile-error-due-to-duplicate-entry-of-rtxt" id="compile-error-due-to-duplicate-entry-of-rtxt"></a>

android.enableJetifier=true `を` gradle.properties `に設定します。`修正するには、Jetifier を無効にするか、Push Provisioning SDK を Jetifier の変換から除外してください：

```
android.jetifier.blacklist=tpcsdk-release-1.3.0-220421.aar
```

典型的なコンパイルエラーの詳細は次のとおりです：

{% code overflow="wrap" %}

```
> Failed to transform tpcsdk-debug-1.3.0-210421.aar (project :tpcsdk-debug) to match attributes {artifactType=android-res}.> Execution failed for JetifyTransform: <omitted>/tpcsdk-debug/tpcsdk-debug-1.3.0-210421.aar.> Failed to transform '/Users/abc/Documents/Projects/TPC_SDK/Delivery/TPC_SDK/TPC_SDK_ANDROID_1_2_0/demo/libs/tpcsdk-debug-1.3.0-210421.aar' using Jetifier. Reason: duplicate entry: R.txt. (Run with --stacktrace for more details.)
```

{% endcode %}

#### Push Provisioning が新しいアプリを起動する <a href="#push-provisioning-launching-new-app" id="push-provisioning-launching-new-app"></a>

稀に、プッシュプロビジョニングのフローが外部アプリケーションで開かれる場合があります。この場合、起動されたアプリは Google Pay の結果を受け取ることができません。

<figure><img src="/files/9bfd14ad8aabced62c355ca9202a8ea04b09e6bd" alt=""><figcaption><p>発行者アプリケーションの外部でプッシュプロビジョニングのフローが開かれる例。</p></figcaption></figure>

<figure><img src="blob:https://thales-dis-dbp.stoplight.io/18df4a00-07ab-4fd6-8dd8-31292bb4d319" alt=""><figcaption><p>制御が発行者アプリケーションに戻らない場合に Google Pay が表示する結果画面。</p></figcaption></figure>


---

# 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/classic-push-provisioning/ja/gaido/toraburushtingu/android.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.
