[firebase_messaging] API for Send to Topic #5601
Replies: 4 comments
-
Hi @awhitford |
Beta Was this translation helpful? Give feedback.
-
What current method? There is no send method in the API. |
Beta Was this translation helpful? Give feedback.
-
I've update my question |
Beta Was this translation helpful? Give feedback.
-
I am admittedly a Noob with respect to Firebase Messaging. However, messaging implies sending and receiving messages. The Firebase Messaging API has mechanisms to receive messages; I am surprised that there does not seem to be corresponding methods to send messages. Relying on an HTTP POST to send a message seems odd. Why isn't there a Dart method that wraps that logic? The HTTP POST mechanism relies on managing the sensitive Server Key (from Firebase Console, project settings --> cloud messaging --> I imagine a send method and corresponding data structures that would ensure valid communications. Things like:
Right now, adding Firebase Messaging as a dependency does not solve all of my core messaging needs. It sounds like I need to roll my own Is this library truly a Messaging library, or is it a Notification library? The lack of a send method seems to suggest that sending messages from a Flutter app is discouraged. Is that true? Should architectures instead send messages from server logic or Cloud Functions (where the Server Key can be secured)? |
Beta Was this translation helpful? Give feedback.
-
While integrating Firebase Messaging, I was surprised to see that there isn't a send method. I can subscribe to a topic, but I can't easily send a message to that topic. The documentation for Sending Messages says to use
http.post
.I would expect a send method along with related data structures for messages.
Beta Was this translation helpful? Give feedback.
All reactions