How to make the Android device hold a TCP connection to Internet without wake lock?
问题 I want my application to be connected to server though the mobile connection, yet allowing the device to go into sleep mode. I expect it to wake up when IP packates arrives. How can this be done? How to receive "interrupts" from the Internet without draining battery? 回答1: When you are blocked on a read from a tcp stream the device can go into a deep sleep and when tcp traffic comes in it will briefly wakeup the device, as soon as a bit is read in you start a wakelock until you have received