Cloud Firestore Equivalent to Realtime Database “.info/connected” ref?

前端 未结 1 1185
既然无缘
既然无缘 2021-01-14 04:35

I have started migrating over from Firebase Realtime Database to Cloud Firestore. I need a way for the app to be alerted to when Firestore\'s connection state changes, onlin

相关标签:
1条回答
  • 2021-01-14 05:30

    There is no equivalent to Firebase Realtime Database's .info/connected in Cloud Firestore. It's in fact one of the use-cases that is explicitly called on in the blog post comparing Realtime Database and Firestore:

    The Realtime Database has native support for presence -- that is, being able to tell when a user has come online or gone offline. While we do have a solution for Cloud Firestore, it's not quite as elegant.

    The Firestore documentation describes a possible implementation of a presence system by combining Realtime Database and Firestore.

    0 讨论(0)
提交回复
热议问题