事件发生后如何向多个用户发送通知? [英] How to send Notifications to multiple users after an Event happened?

查看:83
本文介绍了事件发生后如何向多个用户发送通知?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿,我是android的新手,我制作了一个应用程序,使用户可以上传文件(教授),以便学生可以出于教育目的下载文件.

Hey I'm new to android and i made an application that enable the user to upload a file (Professor) so that Students can download it for educational purposes.

我要指出的是,当教授将某些内容上传到应用程序时,我需要应用程序向用户发送通知,通知他们新文件已准备就绪.我正在使用Firebase,我想知道是否有一种简单的方法来实现这一目标.

I came to point that i want when the professor upload something to the application, I need the application to send a notification to the users notifying them that a new File is ready. I'm using Firebase and I want to know if there is an easy way to achieve that.

推荐答案

如果您将Firebase数据库与FCM一起使用,则可以使用

If you're using Firebase Database along with FCM, you could make use of Cloud Functions for Firebase. Specifically, the Database Triggers.

说,教授上传一个文件(也许使用Firebase Storage),您可以将触发器设置到一个节点(例如uploaded_files),该节点将向那些特定用户发送推送通知-我认为在其中使用Topics声音很好(学生可以加星一位教授来订阅更新).

Say, the professor uploads a file (maybe using Firebase Storage) you could have a trigger set to a node (e.g. uploaded_files) that will send push notifications to those specific users -- where I think making use of Topics sounds good here (students could star a Prof to subscribe for updates).

简单直接.

这篇关于事件发生后如何向多个用户发送通知?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆