This question already has an answer here:
- How do you send a Firebase Notification to all devices via CURL? 6 answers
I would like to send data messages to all users.
Is it possible to do it programmatically, without using the Firebase Notifications Console?
The problem with the Console is that the "message text" field at the beginning of the form is compulsory. So, even if I add the custom data key/values, there will also be the standard notification component.
As stated here, when the message includes both notification and data, in case the app is in the background, a standard notification message will be notified to the system tray.
I would like instead to deliver only a notification based on the custom data (trigged by OnMessageReceived
).
How can I achieve that? Programmatically, I can correctly send data messages to specific users, but I cannot find a way to send data messages to ALL users.