send notification when new child is added to Firebase database

我们两清 提交于 2019-12-24 02:22:19

问题


I am using Firebase database in my app, and I need to send a notification to the Admin when a new order is added to the database "new child added to the database".
I found something called Firebase cloud messaging but I don't know how to use it.

Any help, please?


回答1:


The Firebase Cloud Messaging is used to send push notification to a devices or a group of devices.The thing that you want to achive can be implemented by using Cloud Functions for more details

HERE

Codelab

You need to specify a node which will be trigger when a child is added to a database in cloud function and than in that cloud function you can write your logic to send push notification to the admin

This Example will help to you start with



来源:https://stackoverflow.com/questions/47406899/send-notification-when-new-child-is-added-to-firebase-database

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!