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?
source
share