title: how to find out screen status on an android device?
body: <p>Is there any way to find out that the android device screen is on or not without broadcast receivers? I want to make minute interval updates on device via service that is invoked by alarm manager. I also want to preserve battery life. So the update service will run if the device screen is on.</p>
  
  <p>i found a solution to my problem with this code:</p>
  
  <pre><code>PowerManager powermanager;
  powermanager = (PowerManager) this.getSystemService(Context.POWER_SERVICE); 
  if (powermanager.isScreenOn())
      {
          ...
      }
  </code></pre>