0

In firebase documentation they say:

With FCM, you can send two types of messages to clients:

Notification messages, sometimes thought of as "display messages." These are handled by the FCM SDK automatically.

Data messages, which are handled by the client app.

It is very easy and straightforward to send notification message through firebase console (I just use Grow => Cloud messaging => New notification).

However there is no such section for data messages, and also documentation does not contains almost any related informations.

How to send data message from firebase console? I dont want to send notification message, because that is basically just a display message handled automatically - I want to send a data message, so I can handle it on my own, inside my app and do something on background

qkx
  • 2,264
  • 5
  • 23
  • 46
  • Looks like the duplicate says it's not possible: "The Firebase Notifications Console can only be used to send notification messages. It cannot be used to send data messages." – Doug Stevenson Aug 20 '20 at 15:01
  • ok, so how to do it without console? – qkx Aug 20 '20 at 15:11
  • Write code using the Firebase Admin SDK or calls the REST API directly. – Doug Stevenson Aug 20 '20 at 15:31
  • well, [this post's answer shows how to do it](https://stackoverflow.com/questions/37711082/how-to-handle-notification-when-app-in-background-in-firebase) but one of comments of approved answer says "When app is in background onMessageReceived does not get called and it's a serious issue in FCM!!!" and it has 68 upvotes. If it's indeed true, then its basically impossible to properly use data messages... – qkx Aug 20 '20 at 15:47

0 Answers0