在将新的子级添加到Firebase数据库中时发送通知 [英] send notification when new child is added to Firebase database
问题描述
我在我的应用程序中使用Firebase数据库,并且在向数据库添加新订单向数据库添加了新子项"时,我需要向管理员发送通知.
我找到了一种称为Firebase云消息传递的东西,但我不知道如何使用它.
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.
有什么帮助吗?
推荐答案
Firebase Cloud Messaging用于将推送通知发送到一个设备或一组设备.要实现的功能可以使用Cloud Functions来实现.了解更多详情
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
您需要指定一个节点,当将一个孩子添加到云功能的数据库中时,该节点将被触发,然后在该云功能中,您可以编写逻辑以将推送通知发送给管理员
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
此示例将有助于您以
这篇关于在将新的子级添加到Firebase数据库中时发送通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!