Android FCM Credentials
On Android, Firebase is required for push notifications.
Firebase Unity SDK is required for Teak to function. If your game does not have Firebase, you will need to add it. If you aren’t using any other Firebase features, we recommend installing only Instructions are on the Firebase site here: Add Firebase to your Unity project. |
With Firebase successfully installed, you can proceed to the uncomplicated task of copying keys from their dashboard to ours.
Firebase Cloud Messaging (v1) Credentials Guide
In order to send notifications to your game on Android, Teak needs your Firebase Cloud Messaging (FCM V1) credentials.
In this guide, we’ll download a Service Account Key (in JSON format), and copy the Sender ID value from your Firebase console, and input those into Teak.
If you already have FCM (Legacy) setup with Teak, please see our Firebase (v1) Migration guide for instructions on ensuring a smooth rollover from Legacy credentials to v1 credentials. |
You will need the following accounts to complete this step:
-
An account on the Firebase Console with an Editor or Owner role and access to your game
-
An account on Teak with access to your game
Open in your Firebase project.
-
Go to your Firebase Console and open the project for your game. This must be the same project that you are using to authenticate the Firebase SDK in your game.
If you need to confirm that you have the correct Firebase project: Open the
google-services.json
file from your Unity Project and find theproject_number
. Confirm that the value matches theSender ID
value on the Cloud Messaging tab. -
Click the gear icon in the upper left corner, and click Project settings.
-
Click on the Cloud Messaging tab.
Enable Firebase Cloud Messaging API (V1), (if it isn’t already enabled).
-
Make sure that Firebase Cloud Messaging API (V1) is enabled. Support for FCM (Legacy) will be discontinued by Google on June 20th, 2024.
Enabling Firebase Cloud Messaging API (V1)If the V1 API isn’t enabled, proceed with these steps to activate it.
-
In the Firebase Cloud Messaging API (V1) section, click on the 3 vertical dots. ⋮
-
Click Manage API in Google Cloud Console.
-
In the new tab that opens, click Enable.
-
This will load the API/Service Details page. After the page has loaded, close this tab.
-
Return to the Firebase Console page and refresh the page.
-
Firebase Cloud Messaging API (V1) should now be enabled.
-
Copy the Sender ID to Teak
-
In the Teak Dashboard for your game, navigate to .
If you already have FCM (Legacy) setup with Teak, please see our Firebase (v1) Migration guide for instructions on ensuring a smooth rollover from Legacy credentials to v1 credentials.
-
Click Setup Firebase Cloud Messaging (V1) to open the FCM setup modal.
-
Copy
Sender ID
from Firebase to theFCM Sender ID
field in the setup modal for Teak.
Leave this modal open for the next step.
Generate a Service Account Key in Firebase
-
Back in the Firebase dashboard, click the Service accounts tab.
-
By default, the Firebase Admin SDK service account will be selected. This is fine for most cases.
-
Click the Generate new private key button and confirm you want to Generate key in the popup. This will download a
private key
as aJSON
file.
Upload the Service account private key to Teak
-
Return to the Teak dashboard. The FCM setup modal should still be open.
-
Click the Select private key file (JSON) and locate the private key
-
Click Save to confirm your changes.
With that setup complete, we’re ready to move to Unity to get the Teak SDK installed.
Amazon Fire Devices
If you are also shipping to Amazon Fire devices, Amazon has it’s own push notification credentials setup. You will need to follow our Amazon Fire Setup guide to get push notifications working on Amazon devices. |