FirebasePushNotificationPlugin icon indicating copy to clipboard operation
FirebasePushNotificationPlugin copied to clipboard

Event not fire when app in background(android)

Open FetFrumos opened this issue 4 years ago • 2 comments

I use your 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?

FetFrumos avatar Jul 04 '20 15:07 FetFrumos

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

FetFrumos avatar Jul 15 '20 14:07 FetFrumos

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

If you remove notification then you won't see alert when iOS app is not active.

timdinhdotcom avatar Oct 03 '21 04:10 timdinhdotcom