Forum Xamarin.Android
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

FirebasePushNotificationPlugin(xamarin) - events not fire when app in background(android)

ZenDroidZenDroid USMember ✭✭✭

I use this plugin for my Xamarin Forms app(android). Any event not fire when app is in background. Events work when the application is in the foreground. But app is background any event not fire, the app is just opening. But I need to pass the message parameters to the application. I'm not sure if this is a bug, maybe this is my mistake. I will be grateful for any help. I use this api for send message:

https://fcm.googleapis.com/fcm/send

This is my payload:

{
"data": {
"id_serv" : "12",
"id_group" : "1",
"click_action":"Accept"
},
"notification" : {
"body" : "test",
"title" : "test"
},

"priority": "high",
"condition": "'g1' in topics"
}

I also subscribe to all available events - OnNotificationAction, OnNotificationOpened, OnNotificationReceived. I also try to subscribe at the android level, but this also does not work. Any help?

Posts

  • ZenDroidZenDroid USMember ✭✭✭
    edited July 15

    I fixed it. Need delete "notification". More detail here

Sign In or Register to comment.