android - How to detect a client that stops listening in firebase? -


let's have 3 clients listening changes on firebase root. each client represents user in list (or map) on root. want remove user loses connection or closes client app (i.e. stops listening). how can detect when happens , handle change?

super easy. check out ondisconnect(). can write data out node when user disconnects or update value in node. example, on disconnect change user status (maybe stored in users node) status:disconnected.


Comments

Popular posts from this blog

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -