2

I tried to follow Microsoft Azure's guide to setup Push Notification with Android. But at step 4 I am stucked, as I can not find any places to enable the API for Push Notification, as the link leads to Firebase Cloud Messaging, which I can not use, since I need to provide my app for Windows too.

Azure requires GCM, but when I set it up using GCM, it fails with errorcode 401. What can I do?

Lasse Madsen
  • 592
  • 9
  • 30
  • FCM is the superset of frozen feature-set GCM and they support iOS, Android and web mobile clients. They do not directly support Windows clients. You might want to look at 3rd party service buses that provide a unified messaging system that support APNS, GCM/FCM, etc... The Azure Messaging service is one that does just that. – SushiHangover Sep 27 '16 at 12:13
  • Yes, that's why I tried to set it up, but I can not enable GCM that way the told me to – Lasse Madsen Sep 27 '16 at 12:14
  • Are you talking about enabling GCM and creating an API key in Google Cloud Console? – SushiHangover Sep 27 '16 at 12:24
  • I am just talking about enabling GCM API, as that is not that intuitive, as Azure says in their guide. – Lasse Madsen Sep 27 '16 at 12:25
  • `enabling GCM API`? In Azure console or Googles? Have you enabled GCM and created a key based upon your app package name and signing key? You do that first in "Google API Console" first and use the resulting key in Azure's console, then you can setup GCM and Azure messaging client in your android app. – SushiHangover Sep 27 '16 at 12:30
  • In Googles Developer Console – Lasse Madsen Sep 27 '16 at 12:32
  • They have a full set of guides available that walk you through the steps: https://developers.google.com/cloud-messaging/gcm – SushiHangover Sep 27 '16 at 12:36
  • Thx for your help – Lasse Madsen Sep 27 '16 at 15:26

2 Answers2

0

I don't think, that Nikunji's answer helps. You are developing a cross platform app with xamarin. You should follow this guide, instead of Microsoft Azure's one, because the Azure Guide ist just for Android.

Good luck!

Edit: Based on the comments, I think you you should take a look at this and this.

jdstaerk
  • 882
  • 1
  • 13
  • 30
  • I am following Azure's guide, since I want to use a 3rd party messaging service. Xamarin's guide is also out-of-date :( – Lasse Madsen Sep 27 '16 at 12:13
0

... the link leads to Firebase Cloud Messaging, which I can not use, since I need to provide my app for Windows too

Is Register your app for the Windows Store section in Getting started with Notification Hubs for Windows Universal Platform Apps what you are looking for? If I understood you correctly, you were looking not for Xamarin-specific code, but for how to set up a hub to push to Windows devices. If it's not correct, please clarify in comments for this answer.

... the problem is, that Android is based upon GCM, and they now are using FCM

Notification Hubs: how to Enable Firebase cloud messaging provides information about that.

Nikita R.
  • 7,245
  • 3
  • 51
  • 62