Reputation: 307
I have an application which is using Firebase. I want to change some field in database(online status of user) from true to false when user turn off internet connection(data or wifi). Thanks.
Upvotes: 0
Views: 798
Reputation: 887
https://firebase.google.com/docs/reference/android/com/google/firebase/database/OnDisconnect is the function you need to check out. It tells the server what to do when a client disconnects
Upvotes: 2