Android FCM Integration


Firebase Cloud Messaging (FCM)

Firebase Cloud Messaging is the official Android push channel provided by Google. Through this, you can provide a stable and fast push notification service to your Android app.


1. Create a Firebase Project

(Skip to step 2 if you already have a Firebase project)

Push notifications require a Firebase project. If you don't have a project yet, click "Add project" and set up a new project.

Firebase Project Page

Firebase Project Page

2. Check if Firebase Cloud Messaging API (V1) is enabled

If you just created a new project, it should be enabled by default, so you can skip this step. However, if you're using a previously created Firebase project, you need to check if 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

Firebase Project Settings

If the Firebase Cloud Messaging API (V1) is disabled, click the top-right icon and go to the API management page.

Firebase Cloud Messaging API (V1) Disabled

Firebase Cloud Messaging API (V1) Disabled

Click the Enable button.

Enable Firebase Cloud Messaging API (V1)

Enable Firebase Cloud Messaging API (V1)

3. Generate a Private Key JSON File

Navigate to the Service Accounts tab in the Project Settings.

Click Generate New Private Key at the bottom of the page.

Project Settings > Service Accounts Tab

Firebase Project Settings > Service Accounts Tab

Then, click Generate Key.

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

πŸ“˜

Required Permissions

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

  • cloudmessaging.messages.create
  • firebase.projects.get

4. Set up Android Push Notifications in the Hackle Dashboard

In the Hackle dashboard, go to Settings > External Integrations tab and click the "Integrate" button for Android Push Messages (FCM).

Hackle Dashboard External Integrations Page

Hackle Dashboard External Integrations Page

Select the JSON file downloaded in step 3 and save.