1
votes

Google has replaced GCM (Google Cloud Messaging) with the new FCM (Firebase Cloud Messaging) for push notifications. I am trying to implement push notifications in my Android (Xamarin.Forms) project. It appears that FCM is not yet supported for Forms due to Google Play Services dependency issues (see details below). When I attempt to implement using the old GCM system, the Google Developer Console will not allow me access the GCM API credentials page (just redirects me to FCM). Does anyone have any suggestions to get push notifications working with Android in a Xamarin.Forms solution?

Note: I am using Azure Notification Hub to send the messages (I have iOS already working)

Dependency Issue: The latest Xamarin.Forms package is dependent on Xamarin.Android.Support.v4 (23.3.0). Xamarin.Firebase.Messaging is dependent on Xamarin.GooglePlayServices.Basement (32.961.0). Xamarin.GooglePlayServices.Basement (32.961.0) is dependent on Xamarin.Android.Support.v4 (>=24.2.1).

2

2 Answers

1
votes

My android solution is on:

https://forums.xamarin.com/discussion/70248/firebase-configuration

Just search for my name as UmutBebek. I'm using pushSharp to send push-notifications from my own server. There is a simple example for that too.

0
votes

Almost a year later and this should not be an issue anymore.

I have a Xamarin Forms (2.4.0) app pegging Xamarin.Android.Support v4 at version 25.1.0 and I just installed Xamarin.Firebase.Messaging (42.1021.1) happily alongside it via nuget.