0
votes

I read the following in the docs here https://firebase.google.com/docs/firestore/pricing#listens

"Also, if the listener is disconnected for more than 30 minutes (for example, if the user goes offline), you will be charged for reads as if you had issued a brand-new query."

But I was wondering, if the user is idle but never goes offline, will the listener keep working indefinitely?

For example, if Firestore has 50 documents and the user opens the app and starts the listener which generates 50 reads. Then the user keeps the app open but is idle and does nothing for the next 24 hours with no loss of internet connectivity. Will the listener keep listening for the entire time? And if so, will no additional reads be generated during that idle time (assuming no changes to the database are made)?

Thanks!

1

1 Answers

1
votes

if the user is idle but never goes offline, will the listener keep working indefinitely?

Yes, as long as there is an active internet connection, it will continue listening. There are no additional reads unless one of your listeners is delivered an update for a changed document.