Register for Android SDK push notifications using Firebase Cloud Messaging HTTP v1
This article applies to call and chat applications using Android SDK with Firebase Cloud Messaging (FCM) push notification. FCM was previously known as Google Cloud Messaging (GCM/FCM).
On June 20, 2023, Google announced that it deprecated sending messages using the FCM legacy APIs. Google is removing the legacy FCM from service in June 2024. Google recommends migrating from legacy FCM APIs to FCM HTTP v1.
If your existing Android application uses the push notification feature, you need to migrate to the FCM HTTP v1 endpoint.
If you have a new Android application or never used Google FCM, complete the following steps to register for Android SDK push notification using FCM HTTP v1.
Complete the following steps to migrate your push notification to FCM HTTP v1.
1. Generate a private key in Firebase console
Open your project in Firebase console.
Open Project settings > Service accounts.
Select any programming language.
Click Generate new private key to download a JSON file containing your new private key.
Find and open the downloaded JSON file. You need values from this file for the next step.
2. Provide the private key credentials for Google (FCM v1)
Open your Azure Communication Services Notification Hub in the Azure portal.
Open Settings > Google (FCM v1).
Enter the values from your downloaded JSON file in the text boxes for Private Key, Client Email, and Project ID.
Click Save.
3. Verify that your application receives push notifications
Wait a few minutes for the changes you made at the Notification Hub to take effect. Your application might experience duplicate push notifications or missed notifications during this time.
Make sure your application receives push notifications without error.
Troubleshooting
If your application can’t receive push notifications, make sure your new FCM v1 credentials are correct. Repeat the steps in this document as needed to Generate a private key in Firebase console or Provide the private key credentials for Google (FCM v1).
If your application still can’t receive push notifications, contact Azure Communication Services at Microsoft Azure Help+ support.
Related articles
Enable push notifications in your Android chat app Enable push notifications for calls