Skip to content

detect online and Offline Status of user and notifiy other users in Chat Application #3847

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mr3h4n opened this issue May 22, 2017 · 4 comments

Comments

@mr3h4n
Copy link

mr3h4n commented May 22, 2017

detect online and Offline Status of user and notify other users whenever status of user changes.
I am developing Chat Application for Android. i couldn't understand how to implement this feature.
i will be really thankful for any kind of favor. I am using LiveQuery for push notifications.

@Ghostw4lk
Copy link

Ghostw4lk commented May 22, 2017

This is not an issue of parse-server, but I have implemented the same idea in my case.

Add a column in _User class of type boolean called "isOnline".
Users set them selve online/offline and LiveQuery detects changes.
Additional you can add a column "lastSeen" of type date in _User class, to
check the last activity. If users offline than show the "lastSeen" value.

Hope that helps.

@natanrolnik
Copy link
Contributor

Please ask questions of this type in Stack Overflow. We try to use GitHub issues to track bugs.

@sbmvirdi
Copy link

but what if the user directly turns off his internet there should be some method to detect the disconnection of the client from the host. like firebase realtime database has an onDisconnect method which is called after approx 120 sec after the client is disconnected from the host.
Have a look at the doc:
Screenshot 2021-05-15 at 11 54 24 AM

@mtrezza
Copy link
Member

mtrezza commented May 15, 2021

This is already possible with LiveQuery, see #1906 and #7043.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants