# Android FCM Integration

## Firebase Cloud Messaging (FCM)

Firebase Cloud Messaging is the official Android push channel provided by Google. It enables you to deliver reliable and fast push notification services to Android apps.

***

A Firebase project is required for push notifications. Hackle uses the Firebase Cloud Messaging V1 API to send pushes.

Follow the guide below to set up a Firebase project and generate a push key.

{% stepper %}
{% step %}
**Create a Firebase Project**

(Skip to the next step if you already have a Firebase project.)

![Firebase project page](/files/9WNgOPVv3GrVKlIxYQhQ)
{% endstep %}

{% step %}
**Verify Firebase Cloud Messaging API (V1) Is Enabled**

If you just created a new project, it is enabled by default and you can skip this step. However, if you are using a previously created Firebase project, you need to verify that the Firebase Cloud Messaging API (V1) is enabled.

Click the gear icon next to 'Project Overview' and select **Project settings**. On the Project settings page, select the **Cloud Messaging** tab.

![Firebase project settings](/files/7xiPz4Q5sG8KgT7nsSPV)

If \*\*Firebase Cloud Messaging API (V1)\*\* is disabled, click the icon in the upper right corner to navigate to the API management page.

![When Firebase Cloud Messaging API (V1) is disabled](/files/dUM2NIrR1S9cKReBvGiQ)

Click the **Enable** button.

![Enable Firebase Cloud Messaging API (V1)](/files/vef2P3AFDsVBGaW0eBxU)
{% endstep %}

{% step %}
**Generate a Private Key JSON File**

Navigate to the **Service accounts** tab in Project settings.

Click **Generate new private key** at the bottom of the page.

![Service accounts tab" align="center" src="../../../service-guide/.gitbook/assets/0ea49d3-\_2024-01-31\_11.29.22\_98791c9aad4735d9.png">
Firebase project settings > Service accounts tab](/files/eoPeqzQpdYpPu17OcCJ3)

Then click **Generate key**.

![](/files/mdTtjm6TSDmHPJEoSlxn)

Save the JSON file in a secure location. You will need it soon.

{% hint style="info" %}
Required Permissions

The following service account permissions are required for push notifications to work:

* `cloudmessaging.messages.create`
* `firebase.projects.get`
  {% endhint %}
  {% endstep %}

{% step %}
**Configure Android Push in the Hackle Dashboard**

In the Hackle Dashboard, click the Integrate button for \*\*Android Push Message (FCM)\*\* under **Settings > External Integration**.

![Hackle Dashboard push integration page](/files/hdGVr4cjURSmtg5aITX2)

Select the JSON file downloaded in step 3 and save.

![](/files/r0iV5tjZNZxwgVO69StU)
{% endstep %}
{% endstepper %}


---

# Agent Instructions: 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:

```
GET https://docs.hackle.io/en/external-link/crm-channels/fcm-integration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
