5

I used Azure Notification Hubs with my custom .NET backend with Apple's push notification service and Google Cloud Messaging. That means, my client app registers itself with Apple's or Google's services but notifications will be sent by Notification Hub via the backend and never directly via the vendors' services.

Now that GCM is no longer supported, I tried to migrate it over to FCM.

In the Firebase console I created a new project. The project has a name, a public facing name, a project ID and a Web API Key. All of this is information from the general tab.

In the "Cloud Messaging" tab I am presented a server key and a sender ID.

Question 1: What do I have to paste into Azure's push notifications settings where my GCM key was used before? The Web API key from "General" or the server key from "Cloud Messaging"?

Question 2: My Xamarin.Android client app had to provide the "Google API Project Number" as the sender ID for GCM, in order to register itself for push notifications. Should this now be changed to use the "sender ID" from the "Cloud Messaging" tab in the Firebase Console?

AL.
  • 36,815
  • 10
  • 142
  • 281
Krumelur
  • 32,180
  • 27
  • 124
  • 263

1 Answers1

2

Question 1: Yes, use the Server Key from the Cloud Messaging Tab. Since both GCM and FCM only works using a Server Key.

Question 2: Yes. Since you have to use the corresponding/correct Sender ID in order to properly register your client app to the right project.


On a side note, if you originally had a project in Google Developers Console, why not just Import it to Firebase Console? Also, GCM is still supported has been officially deprecated.

AL.
  • 36,815
  • 10
  • 142
  • 281
  • Answering _"Yes"_ to question one is not really getting me anywhere. Which one is it? :-) I created a new project to see the setup process. It is no longer possible to create a _new_ GCM project. – Krumelur Sep 28 '16 at 13:37
  • @Krumelur. Sorry. I thought you were already asking if you are going to use the Server Key from the Cloud Messaging Tab. – AL. Sep 28 '16 at 13:38
  • Ok. It's working now. My GCM based client receives notifications again. – Krumelur Sep 28 '16 at 13:39
  • @Krumelur. Glad to hear that. Cheers! – AL. Sep 28 '16 at 13:48