Manage your online presence on Cloud Firestore

In Firebase Realtime Database, we can easily control the presence of a user by storing a link to a node and updating it, as shown below:

DatabaseRef presenceRef = FirebaseDatabase.getInstance().getReference("disconnectmessage");

presenceRef.onDisconnect().setValue("I disconnected!");

If I want to do the same in Cloud Firestore, is there a way to achieve it?

+4
source share
1 answer

You can easily use both the cloud-based Firestore and the Realtime database in the same project. For your presence, we recommend that you use the Realtime database to process it.

+2
source

Source: https://habr.com/ru/post/1686949/


All Articles