gorush icon indicating copy to clipboard operation
gorush copied to clipboard

Sending data to topics does not work

Open genna87 opened this issue 1 year ago • 1 comments

Trying to send a notification to Android apps.

Using topics, the data field is not populated, using a list of tokens data is populated as expected. In both cases the expected devices get the notification, but using topic the function com.google.firebase.messaging.RemoteMessage getData() returns null.

Here you can find two sample payloads:

{
  "notifications": [
    {
      "topic": "mytopic",
      "platform": 2,
      "time_to_live": 360,
      "data": {
        "key1": "val1",
        "key2": "val2",
        "key3": "val3"
      }
    }
  ]
}
{
  "notifications": [
    {
      "tokens": ["mytoken"],
      "platform": 2,
      "time_to_live": 360,
      "data": {
        "key1": "val1",
        "key2": "val2",
        "key3": "val3"
      }
    }
  ]
}

THANKS!

genna87 avatar Sep 24 '24 14:09 genna87

The only one here with this problem?

genna87 avatar Oct 07 '24 09:10 genna87

@genna87 Hi. I have encountered your problem. How did you fix it?

iAbbos avatar Dec 10 '24 07:12 iAbbos

Sending data to topic is available? @appleboy

iAbbos avatar Dec 10 '24 07:12 iAbbos

@iAbbos as of now I'm still sending notifications to a batch of tokens

Still waiting for a fix

genna87 avatar Dec 10 '24 08:12 genna87

I will take it.

appleboy avatar Dec 11 '24 15:12 appleboy