I am using AppCenter to send notifications for my Xamarin.Forms application. AppCenter is sending these notifications through Firebase-Cloud-Messaging service to Android devices. I need to handle incoming notifications without the user clicking the notification.
I already have read this SO question and the accepted answer and as it says to handle notifications when the app is killed or in background, we have to send the firebase notification with the
data payload. But with AppCenter you can't send messages with 'data' payload (https://github.com/microsoft/appcenter/issues/87).
So I have tried adding a Service which extends the
onMessageReceived(RemoteMessage remoteMessage) is only called when the app is in the foreground.
Now I'm looking for a way to handle notifications with a custom-service or something similar. In this SO question (https://stackoverflow.com/a/47312925/5278005), someone has already mentioned that they already implemented it.
@annihil we ended up having to create our own implementation of a BroadcastReceiver and JobIntentService to receive the FCM messages and explicitly pulling out the intent filters which sent the messages to the FCM classes shipped w/ their SDK – Jake Hall Jan 30 '18 at 11:58
I have been working with Xamarin.Forms and just a newbie for android development. So is it possible to do it without