As I have said in the title, I can't understand how notifications works when data is changed in Firestore. I have an app that requires notifications to a certain group of users when data is added or existing documents are changed in the database.
I understand how notification channels work with the UI but not how to setup my app to respond to changes in the database in the background when the app isn't running. I can send a notification directly from the console in FireStore. The issue is as stated when data changes in the database. I'm coding in Android Studio with Java.