How to send Notifications to multiple users after

2019-08-20 02:07发布

问题:

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.