title: How to wake up an Android on incoming data
body: <p>I want an Android service, which is listening for data (I have tried TCP and UDP) to wake up the service/phone when data arrives.</p>
  
  <p>Currently the phone stays asleep when IP data arrives <em>and</em> that data is lost.  Is this normal for Android?  I see sleeps of 2+ hours several times a day, and 7+ hour sleeps when I am asleep.</p>
  
  <p>Does GCM provided a solution which wakes up a service/phone when a message arrives.</p>
  
  <p>I need messages to be displayed within a few seconds of them being sent from the server.</p>
  
  <p>Can this only be achieved by keeping the CPU running all day long?  Is there no interrupt from the GSM modem on the arrival of data?</p>