title: How to connect Android Application to Internet when the screen is locked?
body: <p>After some research on Google Search, I tried to find a solution to connect my Android Application to internet when the screen is locked and without the phone charging.</p>
  
  <p>My first impression is that the phone block in background my application. Strange things because others applications on Google Play Store can communicate on the Internet and do things on background.</p>
  
  <p>I have already tried to search solutions on the Internet. My search apparently turn to this link to keep the device awake:</p>
  
  <p><a href="https://developer.android.com/training/scheduling/wakelock" rel="nofollow noreferrer">https://developer.android.com/training/scheduling/wakelock</a></p>
  
  <p>But this solution did not work properly for me and the android system block my application in background when the screen is locked. If the screen is unlocked, the application works properly.</p>
  
  <p>Moreover, I do not understand the problem. Probably, the android energy saver block my application.</p>
  
  <p>Have you any idea to fix this? And if not, how to use the wakeLock?</p>
  
  <p>Thank you :)</p>