Sending a notification if a document is added on a collection (firestore)
Is there a way to get a notification everytime a document is added on a collection viewable in a recyclerview? This is what i have tried so far. It works if something is added, but a notification is sent again if i open the activity containing the recyclerview. I only wanted the notification to appear if outside the app or on another part of the app.
private val CHANNEL_ID = "channel_id_example_01"
private val notificationId = 101...