If I make a fully mobile app system with Firebase as its cloud API endpoint without any web server API helper, is it possible to make Firebase (or the mobile) send push notifications to all or targeted devices if some data on the Firebase met certain criteria?
For example, if I have this kind of data:
com.example.app
+ votes
+ a9sd7f98asdf
- rating: 8
- timestamp: 129387129387
+ asf9d80a9dsf
- rating: 3
- timestamp: 219837182387
+ a9s8d7f9asd8
- rating: 4
- timestamp: 123981723189
+ asf8a9sd8f79
- rating: 9
- timestamp: 123981728388
Is it possible to make Firebase send push notification to all or targeted devices based on the following situations:
Any new rating inside votes is less than 5? (if the Firebase data is getting any new votes that has rating less than 5, the Firebase will immediately send push notification contains static message and/or the path to the data).
Within a week data, the calculated rating average is less than 5? (in a certain time triggered event, the Firebase will do a calculation on the average review and check, if the calculated average is less than 5, the Firebase will send push notification contains static message).
If there's no way to Firebase to do this calculation and checking by its own, is it possible to trigger such push notification send from Android/iOS mobile app?