Notification when data arrives in Firebase

I want to know how to send a notification to a user when new data arrives in Firebase. Since I am running an IoT project, so the sensors will send a text file to the Firebase repository. Upon receipt of the file, Firebase will send a notification to the user. How can I do it?

+5
source share
1 answer

You can create firebase cloud functions that run when data changes in the firebase database to send firebase cloud messages.

Here is a complete example that shows how to use cloud functions to process database events in real time.

http://www.zoftino.com/android-firebase-cloud-functions-realtime-database-trigger-example

+2
source

Source: https://habr.com/ru/post/1275816/


All Articles