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

angularjs - Redirect to a new template in angular js -

Oracle SQL. How to select specific IDs where value of columns specify criteria? -

Desktop Launcher for Python Script Starts Program in Wrong Path (Linux) -