Is There Anyway To Send Notification From One Device To Other Device Using FCM Without Firebase Database?
Solution 1:
Firebase Cloud Messaging does not support directly sending messages to a device. Sending a message to a device (known as a downstream message) requires that you specify the FCM server key, and (as its name implies) that key should only be used on a server, or otherwise trusted environment.
The reason for this is that having the FCM server key for a project allows you to send any message to any and all of the devices in that project, so having this available outside of a trusted environment would be a security concern.
But there is no need to use the Firebase Database to send FCM message. The simplest way to verify this is to send a message through a command line curl call, like shown here: How can I send a Firebase Cloud Messaging notification without use the Firebase Console? You can also implement the code to send a message in Cloud Functions or your own favorite server-side environment without a database. You'll just have to pass in the target of where to send the message into the function.
Post a Comment for "Is There Anyway To Send Notification From One Device To Other Device Using FCM Without Firebase Database?"