title: Android: correct way to use AlarmManager without draining battery
body: <p>I need to do a background check in my app, basically polling various URLs for new stuff. So I've read this is done with the AlarmManager.</p>
  
  <p>The thing is, I don't need the user to be notified as soon as new stuff arrives. Let's say I'm checking every hour, I'm perfectly fine with not doing any check while the phone is sleeping, and resuming the checks when the phone is used. That way the user eventually gets the notification, but the drain is minimal.</p>
  
  <p>So I've tried with setInExactRepeating. I'm starting it at boot time, but also at app startup (mostly for the session after install, and to make sure it's running even if the app gets "force killed"). How do I prevent all these checks to add up? (A new check should only be run if none is running, or the previous one needs to be stopped).</p>