Home > Software design >  Use Firebase Cloud Messages with SQL?
Use Firebase Cloud Messages with SQL?

Time:02-17

What I am trying to do is basically to automatize the FCM service, so I don't need to create the messages and schedule its action from the firebase messaging panel, but instead use SQL database will create that instance or schedule that notification automatically to be send at a certain hour. (Example: a delivery man ends its shift and a Store procedure register the hour so the supervisor knows the status of the route via the notification, something like the amazon delivery tracking works to notify the status of your delivery). What I want to know is if there is any way to integrate SQL to create those messages so firebase can send them. And if there is a way, how it works.

CodePudding user response:

I would write a trigger in my backend service so that when certain a database table/column changed or some query is executed, it will trigger an HTTP request to send a FCM message.

https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages/send

  • Related