> 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/tokenization/ja/apuriidvwo/androidbsunodebaisutono.md).

# Androidベースのデバイスとの統合

### 支払いネットワークTSPを設定する

TSP の構成は TSP 自体に依存します。TSP に確認してください。

たとえば、Google Pay はこれらのパラメータの設定方法に関するガイダンスを提供しています。Google Pay の [TSP 設定](https://developers.google.com/pay/issuers/tsp-integration/app-to-app-idv#tsp_settings).

一般的には、これらのパラメータを支払いネットワークのTSPに渡します。

* **パッケージ名** (applicationId)。Google Pay が呼び出すイシュアアプリケーションを識別します。アプリがインストールされていない場合、End User は Google Play からのインストールを求められます。
* **アクション** (完全修飾)。Google Pay が明示的な Android `Intent`を作成するために使用されます。トークンのアクティベーションに特化してください。

いわゆる "**追加テキスト"**、Base64エンコードされたデータとして渡されます `EXTRA_TEXT`、これはTSPによって作成され、デジタルウォレットでは不透明なオブジェクトとして扱われるJSONオブジェクトであり、そのままイシュアアプリケーションインターフェースを通じて渡されます。

### イシュアアプリケーションハンドラーを実装する

End User がアプリ間 ID\&V を選択すると、イシュアアプリケーションは次を実行する必要があります。

**Intent を受信する**

イシュアアプリケーションは、パッケージ名、アクション、および `EXTRA_TEXT` 決済ネットワーク TSP を通じて提供されるものを使用して呼び出されます。

**End User を認証する**

イシュアアプリケーション内で通常の認証を実行します。

**デジタルカードをアクティベートする**

デコードして `EXTRA_TEXT` デジタルカードを特定し、アクティベートします。

**Digital Wallet に戻る**

呼び出す `activity.setResult(RESULT_OK, ...)` を使用して結果を Digital Wallet に返します。

### **Intent の受信**

Digital Wallet から Intent を受信するには、Android マニフェスト ファイルを更新し、トークンをアクティベートするためのアクティビティ コンテキストを作成します。

マニフェストのエントリ例:

```xml
<activity android:name=".CardActivationActivity">
    <!-- このアクティビティは App To App の ACTIVATE_CARD アクションを処理します -->
    <intent-filter>
        <action android:name="com.example.mybank.action.ACTIVATE_CARD"/>
        <category android:name="android.intent.category.DEFAULT"/>
    </intent-filter>
</activity>
```

### **Digital Wallet からのリクエストを検証する**

Intentを受け取った後、イシュアアプリケーションは `Activity.getCallingPackage()` APIを使用して、リクエストがデジタルウォレットから送信されたものであることを検証します。

たとえば、Google Payの場合、以下のサンプルコードを使用できます:

```java
// 呼び出し元が Google Pay (Google Play Services) であることを検証
if ("com.google.android.gms".equals(getCallingPackage())) {
    // アクティベーションを続行
} 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 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/tokenization/ja/apuriidvwo/androidbsunodebaisutono.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.
