title: android run service in background from time to time when the application is running
body: <p>I am building an android app and when it is running I need to make a call to the my web server at each minute if the user is connected to a certain network.</p>
  
  <p>I plan to use a service to make that call but how do I call it at each minute?.
  I think i need to use alaarm manager but where do I initalize it? in my start activity? I only need to execute the service when my app is running.</p>
  
  <p>Thanks for your help.</p>