Skip to content

Commit 3a0ebe0

Browse files
Merge pull request #276793 from vac0224/vc-fcmv1-call-chat-2024-06-04
New FCM v1 Migrate and Register
2 parents 2f05cd1 + e8f2729 commit 3a0ebe0

8 files changed

+166
-1
lines changed

articles/communication-services/how-tos/calling-sdk/push-notifications.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Enable push notifications for calls.
2+
title: Enable push notifications for calls
33
titleSuffix: An Azure Communication Services how-to guide
44
description: Use Azure Communication Services SDKs to enable push notifications for calls.
55
author: tophpalmer
@@ -64,3 +64,8 @@ In case that you want to revoke an identity you need to follow [this process](..
6464
- [Learn how to subscribe to events](./events.md)
6565
- [Learn how to manage calls](./manage-calls.md)
6666
- [Learn how to manage video](./manage-video.md)
67+
68+
## Related topics
69+
70+
- [Migrate Android SDK push notifications to FCM v1](../../tutorials/call-chat-migrate-android-push-fcm-v1.md)
71+
- [Register for Android SDK push notifications using FCM v1](../../tutorials/call-chat-register-android-push-fcm-v1.md)

articles/communication-services/toc.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,10 @@ items:
241241
href: tutorials/postman-tutorial.md
242242
- name: Send short URL
243243
href: tutorials/sms-url-shortener.md
244+
- name: Migrate to Android push notifications FCM v1
245+
href: tutorials/call-chat-migrate-android-push-fcm-v1.md
246+
- name: Register for Android push notifications FCM v1
247+
href: tutorials/call-chat-register-android-push-fcm-v1.md
244248
- name: Phone numbers
245249
items:
246250
- name: Port a phone number into Azure
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
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-fcm-v1.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+
![Screenshot of how to 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+
46+
![Screenshot of how to provide a new private key credentials for FCM v1 in Azure portal settings.](./media/call-chat-fcmv1-credentials-add.png)
47+
48+
4. Click **Save**.
49+
50+
## 3. Remove legacy credentials for Google (GCM/FCM)
51+
52+
1. Open your Azure Communication Services Notification Hub in the [Azure portal](https://portal.azure.com).
53+
54+
2. Open **Settings** > **Google (GCM/FCM)**.
55+
56+
3. Clear the **API Key** text box.
57+
58+
![Screenshot of how to remove legacy credentials for GCM / FCM from Azure portal settings.](./media/call-chat-fcm-credentials-remove.png)
59+
60+
4. Click **Save**.
61+
62+
## 4. Verify that your application receives push notifications
63+
64+
1. Wait a few minutes for the changes you made at the Notification Hub to take effect.
65+
Your application might experience duplicate push notifications or missed notifications during this time.
66+
67+
2. Make sure your application receives push notifications without error.
68+
69+
70+
## Troubleshooting
71+
72+
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).
73+
74+
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).
75+
76+
77+
## Related articles
78+
79+
[Enable push notifications in your Android chat app](./chat-android-push-notification.md)
80+
[Enable push notifications for calls](../how-tos/calling-sdk/push-notifications.md)
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
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-fcm-v1.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+
![Screenshot of how to generate a 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+
48+
![Screenshot of how to provide a new private key credentials for FCM v1 in Azure portal settings.](./media/call-chat-fcmv1-credentials-add.png)
49+
50+
4. Click **Save**.
51+
52+
53+
## 3. Verify that your application receives push notifications
54+
55+
1. Wait a few minutes for the changes you made at the Notification Hub to take effect.
56+
Your application might experience duplicate push notifications or missed notifications during this time.
57+
58+
2. Make sure your application receives push notifications without error.
59+
60+
61+
## Troubleshooting
62+
63+
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).
64+
65+
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).
66+
67+
68+
## Related articles
69+
70+
[Enable push notifications in your Android chat app](./chat-android-push-notification.md)
71+
[Enable push notifications for calls](../how-tos/calling-sdk/push-notifications.md)

articles/communication-services/tutorials/chat-android-push-notification.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,3 +235,8 @@ If the app is integrated with Azure Function, initialization of application para
235235
android:name=".MyAppConfiguration"
236236
>
237237
```
238+
239+
## Related topics
240+
241+
- [Migrate Android SDK push notifications to FCM v1](./call-chat-migrate-android-push-fcm-v1.md)
242+
- [Register for Android SDK push notifications using FCM v1](./call-chat-register-android-push-fcm-v1.md)
42.9 KB
Loading
88.9 KB
Loading
46.9 KB
Loading

0 commit comments

Comments
 (0)