2

I'm using FirebaseUI to populate a table from the Database, hence, it also listens to changes, e.g. when a child is added, it automatically gets inserted into the table.

Now I'm trying to implement a notification upon that exact even, meaning when there is a new child added to the DB, there should be a notification that a new child has been added.

What is the best practice to do so?

I'm aware that there are Remote Push Notifications (what Firebase offers through its console), but this here is something else right? I guess there is a way in which the app itself notifies the user when a new child is added, but what happens when the app is closed?

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
ffritz
  • 2,180
  • 1
  • 28
  • 64

2 Answers2

6

With the new feature Cloud Functions, you can do this without any need of an external server.

See my response there for more details : Firebase notification on child added/modified

Valentin
  • 5,379
  • 7
  • 36
  • 50
2

You're looking for Firebase Cloud Messaging, which is what Firebase Notifications is built on top of. Note that you will need an app server to run the code that listens for the changes to the database and then calls FCM to send the notification to the user.

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807