How to send Notifications to multiple users after an Event happened?

半城伤御伤魂 提交于 2019-12-25 08:57:59

问题


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.

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.


回答1:


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

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).

Simple and direct to the point.



来源:https://stackoverflow.com/questions/44297442/how-to-send-notifications-to-multiple-users-after-an-event-happened

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