How to get online or offline status of the user to be recorded at the server end?
Application Type
Traditional Web, Mobile, Reactive, Service
Service Studio Version
11.10.20 (Build 41551)

If we have a application that is used by many users consider a mobile app .

so I need to show the user online or offline status to each and every user using the application .

what is the best way to achieve the online offline status view to all the users ?



I have 2 concept suggestion, but neither is real-time (will congest too much traffic if you do this real-time) :  

1. Using firebase to send push notification to the end user.  If notification is received, the end user reply automatically (send back data to server) and the server when received this data, will update the status as online (ping concept, server ping the end user)

2. Using timeout on client action (end user) to update the local storage (example datetime). Then using offline sync to send the datetime to server on specific interval. The server use this data to determine the online or offline status (end user report its status to the server)


Hello Naveen,

You can check with attached (.OML) file May it can help.

The requirement is working but you have to use only Current() Date, Not Current DateTime(). 

Login with one of the user in another browser. Run this .OML in another browser. Select the same user from the dropdown list will sow you as an IsActive(online).

You will know to come who users are IsActive ( Online) and who user are InActive( Offline) .

You can try this and kindly let me know on this.


Ajay S


Hi Ajay Sharma  ,

thanks for your time,

you have used a last login data to show is active or not but I need to get the exact result when the user goes offline .

And also I need solution for mobile app too. just think on that in the mobile or else in web application also it is not necessary to logout of application so on that time you are not able to use the last login data .

the exact scenario I need to do is just consider a chat application which has n number of users and for all other users using the app should able to see the online or offline status of that user and when the particular user get out of an application even without logging out also it should work fine with that scenario .the status change should be in Realtime.


Naveen Chelladurai

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.