-1

i have a firestore database firestore database structure

How do I write a cloud function to send a cloud message to all the app users when one of the fields in the firestore database is updated? in my case when the price of the price_change_pct field goes below the value -1 ?

srikanth
  • 9
  • 4

1 Answers1

0

You can refer to the link, where as stated:

You can invoke a Cloud Function from the Flutter app either through HTTP or a database trigger and let the Cloud Function do the work for you. Inside the function use the Firebase Admin SDK and send messages as you wish.

In the Documentation, the whole description related to Firebase messaging for the multiple devices has been explained briefly. You can also refer to the stackoverflow answer and case where the community resolved a similar issue.

Divyani Yadav
  • 1,030
  • 4
  • 9