title: How to keep an activity running to check network?
body: <p>How to always keep an activity running on the device?</p>
  
  <p>I'm trying to create a chat app like Whatsapp and I want to keep an activity always running, even if the screen is off or the device owner in an other application to check if there is a new message in order to show a notification to the user.</p>
  
  <p>Just exactly like the chat apps: Whatsapp, Viber, Facebook, Voxer, etc.</p>