title: Is downloading files on Android possible when the app is in background without a charger?
body: <p>I'm developing an app where I need to download a 200-300 mb file from the web. Today I noticed a strange behaviour. </p>
  
  <p>I always have my phone plugged to the PC with a cable with Android Monitors running in IntelliJ. Everyhing was running nice, files were downloading even when I was clicking the 'home' button in the middle of the process and I always got a notification to the menu that the downloading has finished - and it was really, complately finished. </p>
  
  <p>Today I unplugged my phone from the pc/cable and opened the app. The downloading process starts but when I click 'home' and the app goes to the background, it won't finish, it won't even continue. It freezes the networking thread or something connected with it.</p>
  
  <p>I read some, and I remember that some popular apps like for example 'Hearthstone' game had the same problem. If you go to the menu, downloading stops. </p>
  
  <p>I figured it out that this is caused by the charger. If the phone is charging when the files are being downloaded, everything is ok.</p>
  
  <p><strong>And my question is.</strong> </p>
  
  <pre><code>Is there any Android permission that will allow me to do this?
  </code></pre>
  
  <p>I heard that it can be changed on the device's settings, but this is a bad solution. </p>
  
  <pre><code>Is there any possibility to download files in background, without a charger and without user's interaction with the settings?
  </code></pre>
  
  <p>I'll also add that I'm using LibGDX engine but it doesn't matter, I can use all of the Android's features.</p>