title: Network access when the Android phone is asleep
body: <p>I'm using a combination of alarm (set with <code>AlarmManager</code>) and background service to periodically synchronize data in my application.</p>
  
  <p>The only problem I have is that when sleep policy terminates Wi-Fi connection the synchronization no longer works.</p>
  
  <p>Is there a way to "wake up" the Wi-Fi connection that has been put to sleep? GMail somehow manages to do that because it notifies me about new e-mail even if the phone entered sleep mode.</p>