title: How to do not let Thread stop themeselves when in standby mode?
body: <p>In my application i have a service created in a different thread than the main one (UI).
  Then, in the service, i created 3 others threads that execute in background indefinitely.
  But as soon as the phone goes in standby mode, these threads suspend their execution!</p>
  
  <p>If i connect the phone to the pc via usb cable, instead, i see that the threads work properly, without suspending themeselves even when in standby mode.</p>
  
  <p>But how to do not let threads have this behaviour in normal execution?</p>
  
  <p>tnx</p>
  
  <p>SOLVED:</p>
  
  <p>I managed to get this simply by using the PowerManager object, which acquire a PARTIAL_WAKE_LOCK that leave the cpu active from the acquire() to the release().</p>
  
  <pre><code>PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE);
   PowerManager.WakeLock wl = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "My Tag");
   wl.acquire();
     ..CPU will stay on during this section..
   wl.release();
  </code></pre>