Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sending data to topics does not work #816

Open
genna87 opened this issue Sep 24, 2024 · 1 comment
Open

Sending data to topics does not work #816

genna87 opened this issue Sep 24, 2024 · 1 comment

Comments

@genna87
Copy link

genna87 commented Sep 24, 2024

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
Copy link
Author

genna87 commented Oct 7, 2024

The only one here with this problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant