Compatibility of Firebase Legacy Cloud Messaging token with Azure Notifications Hubs for future Firebase Cloud Messaging API (V1) migration

Ran Ben David 25 Reputation points
2023-08-30T20:46:20.19+00:00

Hello Azure Support,

We currently have a Firebase project integrated with Azure Notifications Hubs to send notifications to Android devices. As you may be aware, Firebase is transitioning from the Cloud Messaging API (Legacy) to the new Firebase Cloud Messaging API (V1) by June 20, 2024.

With the existing setup, the Legacy Cloud Messaging API provides us with a token that we seamlessly integrate into the Azure Notifications Hubs to enable notifications for Android devices. However, as we plan for the migration to the new Firebase Cloud Messaging API (V1), we've noticed that this new API doesn't provide a similar token that can be directly used with Azure Notifications Hubs.

While researching the best approach for this transition, I came across a suggestion on an Azure support website that implies we might be able to continue using the token generated by the Legacy Cloud Messaging API for now. This is with the anticipation that Azure Notifications Hubs might eventually accommodate the new Firebase Cloud Messaging API (V1) tokens without requiring manual updates on our end.

Could you kindly provide clarity on whether this is a recommended approach? We want to ensure a smooth transition to the new Firebase Cloud Messaging API (V1) without disrupting our notification services for Android devices. Any guidance, insights, or best practices you can share regarding the compatibility of Legacy Cloud Messaging tokens with Azure Notifications Hubs and their future compatibility with Firebase Cloud Messaging API (V1) would be greatly appreciated.

Thank you for your time and assistance!

Azure Notification Hubs
Azure Notification Hubs
An Azure service that is used to send push notifications to all major platforms from the cloud or on-premises environments.
263 questions
0 comments No comments
{count} votes

Accepted answer
  1. brtrach-MSFT 15,256 Reputation points Microsoft Employee
    2023-09-01T02:39:09.26+00:00

    @Ran Ben David Thank you for reaching out. It's nice to meet you.

    I believe the below is the information you are looking for:

    Firebase Cloud Messaging (FCM) is a service that, among other things, facilitates developers sending push notifications to Google Play-supported Android devices. Azure Notification Hubs currently communicates with FCM using the legacy HTTP protocol. FCM v1 is an updated API that offers more features and capabilities. Google announced that they are deprecating FCM legacy HTTP and will stop supporting it on June 20, 2024. Therefore, developers who use Azure Notification Hubs to communicate with Google Play-supported Android devices today, will need to migrate their applications and notification payloads to the newer format. Azure Notification Hubs will continue to support FCM legacy HTTP until Google stops accepting requests. Once the new FCM integration is complete, Azure Notification Hubs will announce when you can begin migrating. For more details, see the migration steps in the next section.

    Migration steps

    Firebase Cloud Messaging (FCM) legacy API will be deprecated by July 2024. You can begin migrating from the legacy HTTP protocol to FCM v1. You can start the migration process by Feb 1, 2024, and must be migrated by June 2024. To migrate from FCM legacy to FCM v1, follow these steps:

    1. Migrate credentials to FCM v1: enter your FCM v1 credentials to set up notifications. You can find the instructions on how to do this here.
    2. Update your client app to start registering as FCMv1 devices: once you’re ready to start supporting FCMv1 devices, update your client app so that any new devices will start registering as FCM v1 instead of the legacy. When existing FCM legacy registrations expire, they are re-registered as FCM v1. This ensures that notifications are sent to users appropriately, once the FCM legacy is deprecated.
    3. Delete the FCM legacy registrations: once the FCM v1 registrations have been created, delete the corresponding records from the FCM legacy. This prevents duplicate notifications from being sent to your users if you use both APIs. Duplicate notifications can occur and be sent to users if FCM legacy registrations are not deleted.
    4. Update the server app to send notifications to FCM v1: once you have completed the previous steps, you can start sending notifications using the new API.
    5. Stop sending notifications to FCM legacy: once you have removed all FCM legacy devices, stop sending notifications to FCM legacy. All notifications should be sent exclusively to FCM v1 at this point, and you should be fully migrated.

    Let me know if you have further questions or concerns.


0 additional answers

Sort by: Most helpful