OnDisconnect
The OnDisconnect class is used to manage operations that will be run on the server when this client disconnects. It can be used to add or remove data based on a client's connection status. It is very useful in applications looking for 'presence' functionality.
Instances of this class are obtained by calling DatabaseReference.onDisconnect on a Firebase Database ref.
Properties
The Android-SDK-shaped com.google.firebase.database.OnDisconnect this wraps.
Functions
Remove the value at this location when the client disconnects
Ensure the data at this location is set to the specified value when the client is disconnected (due to closing the browser, navigating to a new page, or network issues).
Ensure the data has the specified child values updated when the client is disconnected