title: What is the most efficient way to check a user is online (Messaging Application)
body: <p>We are trying to develop a Messaging Application(Mobile) like Viber. We are now woking on User Status (The user is online or not). We have tested Viber yesterday and understand that if a user close the application or if a user goes out of the Network, rest of other users got it immediately. I mean rest of the users got that the User was Online 'a moment ago'</p>
  
  <p>I know that if the user change his Status, or if a user close the application, an event can fire a request to the server and inform that the user is not online now. And the Server then notify everyone(related users) that message by using Push Method. But if the user goes Out of Network(Disable wifi/cellular), how everyone (related users) get Notified?</p>
  
  <p>What is the efficient way? Any reference link?</p>
  
  <p>Thanks..</p>