> For the complete documentation index, see [llms.txt](https://documentation.pushly.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.pushly.com/pushly-ja/integration/implementation-steps/android/firebaseapurinosettoappu.md).

# Firebaseアプリのセットアップ

## Firebase アプリ

まず、 [<mark style="color:青;">Firebase コンソール</mark>](https://console.firebase.google.com/)、ログインして、既存のプロジェクトを選択するか、新しいプロジェクトを追加します。

プロジェクト内で、〜の横にある歯車アイコンをクリックし `プロジェクトの概要` サイドバーのセクションで、 `全般`.

<figure><img src="/files/74b36a2820312ec4402ea30c756d1e27ec614fa5" alt=""><figcaption></figcaption></figure>

### Firebase Cloud Messaging API（V1）の設定

#### Sender ID（プロジェクト ID）を見つける

〜の `全般` タブで `プロジェクト番号`。この値を Firebase の `Sender ID`.&#x20;

<figure><img src="/files/b3c700e8d5fefc0d09fac52343ce8f20c9430f7f" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Firebase はプロジェクト番号を Sender ID として使用します。
{% endhint %}

#### サービスアカウント JSON をダウンロードする

〜を開く `サービスアカウント` タブ。

〜の下で `Firebase Admin SDK`、クリックします `新しい秘密鍵を生成`.

確認ダイアログで、 `キーを生成`。ブラウザがサービスアカウント JSON ファイルをダウンロードします。

{% hint style="warning" %}
このファイルは非公開にしてください。Firebase プロジェクトの認証情報が含まれています。
{% endhint %}

<figure><img src="/files/62bf90a214ea9bb029be55a22150ed4c88ec4f8b" alt=""><figcaption></figcaption></figure>

#### プラットフォームで統合を有効にする

プラットフォームにログインし、 `設定` ページに移動し、 `送信インテグレーション` セクションを見つけます。

ここから、 `編集` ボタンを `送信インテグレーション` ヘッダーでクリックし、 `ネイティブ` の下にあるスイッチを `Android` 見出しで：

1. Firebase の `Sender ID` 前に取得したものを入力してください。
2. 〜をクリックします `サービスアカウント JSON ファイルをアップロード` 領域を選択し、ダウンロードしたファイルを選択します。
3. 〜をクリックします `送信` ボタン

![](/files/11bc1aee412005534eff838bfcf0cf9492dfe9cb)

すべて正しく入力されていれば、今はその下にセクションが表示されるはずです `送信インテグレーション` そこに、アクティブな Android ネイティブ統合が表示されます。

<figure><img src="/files/7ecaa1e9b1c055665157fbdfde704d0c9dfb3400" alt=""><figcaption></figcaption></figure>

この手順が完了したら、アプリへの SDK 実装を続けられます

### Cloud Messaging API（レガシー / 廃止予定）

{% hint style="danger" %}
2023年6月20日現在、 [Google は廃止しました](https://firebase.google.com/support/faq#fcm-23-deprecation) レガシー FCM API と、それらを使用したメッセージ送信は、2024年6月以降機能しなくなります。

そのため、今後の通知配信の中断を避けるため、上記の V1 手順の使用を推奨します。
{% endhint %}

もし〜が `Cloud Messaging API（レガシー）` が無効と表示されている場合は、有効にする必要があります。

<figure><img src="/files/8c94039ffeebe6082aba4514dc033eddd2126e28" alt=""><figcaption></figcaption></figure>

次の手順に従ってください：

* 〜の横にある3点メニューをクリックします `Cloud Messaging API（レガシー）`
* 選択 `Google Cloud Console で API を管理`
* クリック `有効にする` 開いたタブで
* ページが再読み込みされたら、このタブを閉じて Firebase コンソールに戻れます
* Firebase コンソールのタブでページを更新し、有効化された API を反映します

レガシー API が有効化されると、 `サーバーキー` と `Sender ID` が表示されます。これらの値をそれぞれ控えて、Pushly プラットフォームに進んでください。

プラットフォームにログインし、 `設定` ページに移動し、 `送信インテグレーション` セクションを見つけます。

ここから、 `編集` ボタンを `送信インテグレーション` ヘッダーでクリックし、 `ネイティブ` の下にあるスイッチを `Android` 見出しで：

1. Firebase の `Sender ID`
2. 選択 `レガシー` ピル選択から
3. 〜を入力 `サーバーキー`
4. 〜をクリックします `送信` ボタン

<figure><img src="/files/160f4e3cacc8c628378b75d125c912a2dcf0b771" alt=""><figcaption></figcaption></figure>

すべて正しく入力されていれば、今はその下にセクションが表示されるはずです `送信インテグレーション` そこに、アクティブな Android ネイティブ統合が表示されます。

<figure><img src="/files/7ecaa1e9b1c055665157fbdfde704d0c9dfb3400" alt=""><figcaption></figcaption></figure>

この手順が完了したら、アプリへの SDK 実装を続けられます


---

# 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://documentation.pushly.com/pushly-ja/integration/implementation-steps/android/firebaseapurinosettoappu.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.
