I am designing an app which needs to know which users are online or offline. Each user can notify the server if he is online or offline and then I can get that information from the server.
The issue is that is there a standard in android which marks the user as online or offline.
One solution is if the app is running then the user is online, if the app force stopped or not running then the user is offline. So in my app how will I know that the app is stopping?
If the above is not possible or not a good solution then when will my app tell the server that it is going offline.
Thanks in advance.