Search code examples
google-cloud-firestorereal-time-updates

Firestore realtime updates on several documents?


Here is a simple way to get automatic updates from the DB to an activity for instance. It refers to only one single document. My data are split into several documents on several collections, with no hierarchy (but it could be) Is it possible to 'watch' several document? Thanks,


Solution

  • You set up a listener on as many documents as you want. Each listener will have to be established separately. It cannot be done with a single call to addSnapshotListener.