Is there any way to send Notification automatically from flutter app or when Realtime database updates?
i have app that contains products, stores and i want to send push notification when store add new product to notify all customers that the store added new products
is there any way to do something like this without backend server?
2
Answers
No, not without any form of backend. You could use "serverless" solutions such as cloud functions to do the task though.
You can use Cloud Functions, the Google/Firebase "serverless framework that lets you automatically run backend code in response to events triggered by Firebase features".
There is an example in the Cloud Functions samples library which demonstrates how to send a Firebase Cloud Messaging (FCM) notification from a Realtime Database triggered Function.
The FCM documentation also shows several code examples (see the Node.js tabs if you use Cloud Function 1st generation, or Node.js or Python tab if you use Cloud Function 2nd generation).