Skip to content

Commit 01f5d10

Browse files
committed
New FCM v1 Migrate and Register
Added FCM v1 migrate and register articles.
1 parent 429fdc5 commit 01f5d10

File tree

5 files changed

+154
-0
lines changed

5 files changed

+154
-0
lines changed
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
---
2+
title: Migrate Android SDK push notifications to FCM v1
3+
titleSuffix: An Azure Communication Services tutorial
4+
description: Learn how to migrate Android SDK push notifications from Google Cloud Messaging (GCM/FCM) to Firebase Cloud Messaging (FCM HTTP v1).
5+
author: jiminwen
6+
services: azure-communication-services
7+
ms.author: jiminwen
8+
ms.date: 05/31/2024
9+
ms.topic: tutorial
10+
ms.service: azure-communication-services
11+
---
12+
13+
# Migrate Android SDK push notifications to Firebase Cloud Messaging HTTP v1
14+
15+
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).
16+
17+
On June 20, 2023, Google announced that it [deprecated sending messages using the FCM legacy APIs](https://firebase.google.com/docs/cloud-messaging). Google is removing the legacy FCM from service in June 2024. Google recommends [migrating from legacy FCM APIs to FCM HTTP v1](https://firebase.google.com/docs/cloud-messaging/migrate-v1).
18+
19+
If you have a new Android application or never used Google FCM, see the [Register for Android SDK push notifications using FCM v1](./call-chat-register-android-push-fcmv1.md) article.
20+
21+
If your Android application uses the push notification feature, complete the following steps to migrate your push notification to FCM HTTP v1.
22+
23+
## 1. Generate a private key in Firebase console
24+
25+
1. Open your project in [Firebase console](https://console.firebase.google.com/).
26+
27+
2. Open **Project settings** > **Service accounts**.
28+
29+
3. Select any programming language.
30+
31+
4. Click **Generate new private key** to download a JSON file containing your new private key.
32+
33+
![Generate new private key for FMC v1 in Firebase console.](./media/call-chat-fcm-firebase-console-gen-key.png)
34+
35+
5. Find and open the downloaded JSON file. You need values from this file for the next step.
36+
37+
38+
## 2. Provide the private key credentials for Google (FCM v1)
39+
40+
1. Open your Azure Communication Services Notification Hub in the [Azure portal](https://portal.azure.com).
41+
42+
2. Open **Settings** > **Google (FCM v1)**.
43+
44+
3. Enter the values from your downloaded JSON file in the text boxes for **Private Key**, **Client Email**, and **Project ID**.
45+
![Provide new private key credentials for FCM v1 in Azure portal settings.](./media/call-chat-fcmv1-credentials-add.png)
46+
47+
4. Click **Save**.
48+
49+
## 3. Remove legacy credentials for Google (GCM/FCM)
50+
51+
1. Open your Azure Communication Services Notification Hub in the [Azure portal](https://portal.azure.com).
52+
53+
2. Open **Settings** > **Google (GCM/FCM)**.
54+
55+
3. Clear the **API Key** text box.
56+
![Remove legacy credentials for GCM / FCM from Azure portal settings.](./media/call-chat-fcm-credentials-remove.png)
57+
58+
4. Click **Save**.
59+
60+
## 4. Verify that your application receives push notifications
61+
62+
1. Wait a few minutes for the changes you made at the Notification Hub to take effect.
63+
Your application might experience duplicate push notifications or missed notifications during this time.
64+
65+
2. Make sure your application receives push notifications without error.
66+
67+
68+
## Troubleshooting
69+
70+
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](#1-generate-a-private-key-in-firebase-console) or [Provide the private key credentials for Google (FCM v1)](#2-provide-the-private-key-credentials-for-google-fcm-v1).
71+
72+
If your application still can’t receive push notifications, contact Azure Communication Services at [Microsoft Azure Help+ support](https://ms.portal.azure.com/#view/Microsoft_Azure_Support/HelpAndSupportBlade/~/overview).
73+
74+
75+
## Next steps
76+
77+
Any?
78+
79+
## Related articles
80+
81+
[Enable push notifications in your Android chat app](./chat-android-push-notification.md)
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
---
2+
title: Register for Android SDK push notifications using FCM v1
3+
titleSuffix: An Azure Communication Services tutorial
4+
description: Learn how to register for Android SDK push notifications using Google Firebase Cloud Messaging (FCM HTTP v1).
5+
author: jiminwen
6+
services: azure-communication-services
7+
ms.author: jiminwen
8+
ms.date: 05/31/2024
9+
ms.topic: tutorial
10+
ms.service: azure-communication-services
11+
---
12+
13+
# Register for Android SDK push notifications using Firebase Cloud Messaging HTTP v1
14+
15+
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).
16+
17+
On June 20, 2023, Google announced that it [deprecated sending messages using the FCM legacy APIs](https://firebase.google.com/docs/cloud-messaging). Google is removing the legacy FCM from service in June 2024. Google recommends [migrating from legacy FCM APIs to FCM HTTP v1](https://firebase.google.com/docs/cloud-messaging/migrate-v1).
18+
19+
If your existing Android application uses the push notification feature, you need to [migrate to the FCM HTTP v1 endpoint](./call-chat-migrate-android-push-fcmv1.md).
20+
21+
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.
22+
23+
Complete the following steps to migrate your push notification to FCM HTTP v1.
24+
25+
## 1. Generate a private key in Firebase console
26+
27+
1. Open your project in [Firebase console](https://console.firebase.google.com/).
28+
29+
2. Open **Project settings** > **Service accounts**.
30+
31+
3. Select any programming language.
32+
33+
4. Click **Generate new private key** to download a JSON file containing your new private key.
34+
35+
![Generate new private key for FMC v1 in Firebase console.](./media/call-chat-fcm-firebase-console-gen-key.png)
36+
37+
5. Find and open the downloaded JSON file. You need values from this file for the next step.
38+
39+
40+
## 2. Provide the private key credentials for Google (FCM v1)
41+
42+
1. Open your Azure Communication Services Notification Hub in the [Azure portal](https://portal.azure.com).
43+
44+
2. Open **Settings** > **Google (FCM v1)**.
45+
46+
3. Enter the values from your downloaded JSON file in the text boxes for **Private Key**, **Client Email**, and **Project ID**.
47+
![Provide new private key credentials for FCM v1 in Azure portal settings.](./media/call-chat-fcmv1-credentials-add.png)
48+
49+
4. Click **Save**.
50+
51+
52+
## 3. Verify that your application receives push notifications
53+
54+
1. Wait a few minutes for the changes you made at the Notification Hub to take effect.
55+
Your application might experience duplicate push notifications or missed notifications during this time.
56+
57+
2. Make sure your application receives push notifications without error.
58+
59+
60+
## Troubleshooting
61+
62+
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](#1-generate-a-private-key-in-firebase-console) or [Provide the private key credentials for Google (FCM v1)](#2-provide-the-private-key-credentials-for-google-fcm-v1).
63+
64+
If your application still can’t receive push notifications, contact Azure Communication Services at [Microsoft Azure Help+ support](https://ms.portal.azure.com/#view/Microsoft_Azure_Support/HelpAndSupportBlade/~/overview).
65+
66+
67+
## Next steps
68+
69+
Any?
70+
71+
## Related articles
72+
73+
[Enable push notifications in your Android chat app](./chat-android-push-notification.md)
42.9 KB
Loading
88.9 KB
Loading
46.9 KB
Loading

0 commit comments

Comments
 (0)