title: Android service stops working when phone locked
body: <p>I have an application which starts a service. The service has a timer and pops a notification every 30 seconds. I notice the following behavior:</p>
  
  <ul>
  <li>if the screen is on the notifications are shown ok (even if the app is in background)</li>
  <li>if the screen is off (by power button or by itself) the notifications won't show</li>
  <li>if the screen is off but I have the debugging running the notifications appear</li>
  </ul>
  
  <p>How can I make the service run with the screen off.</p>
  
  <p>(The actual app only checks if a notification should be checked every 30 seconds, but for testing purposes, the above scenario is ok)</p>
  
  <p>Thanks!</p>