title: Android, Internet & Sleep
body: <p>So I have a music app that continuously downloads data from a server and plays it back on the phone.</p>
  
  <p>The problem:
  After a few minutes the music stops, apparently because Android went to sleep and stops all data transfer. The connections aren't even closed, the reading Threads are simply paused. FYI, I am running this in a service which is running in foreground mode. I have also aquired a <code>PARTIAL_WAKE_LOCK</code>.</p>
  
  <p>However, the partial wake lock only prevents the CPU from going to sleep, not the network connection. The solution seems to be to aquire a <code>FULL_WAKE_LOCK</code> which works but has the ugly side effect that the bright and energy hungry screen stays on.</p>
  
  <p>It seems like major music apps (like Pandora) are doing the same thing.</p>
  
  <p>So the question:
  Is there a better way to get Android to keep the internet connection alive? Is there some way / workaround to achieve an <code>INTERNET_WAKE_LOCK</code>?</p>