standby

How to make the Android device hold a TCP connection to Internet without wake lock?

你。 提交于 2019-11-27 00:24:58
问题 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

Android Sleep/Standby Mode

混江龙づ霸主 提交于 2019-11-26 12:46:59
I have made an app that starts a service, which starts a timer, which fires off a small function after an amount of time. This is working great on the emulator and on the Motorola Droid 1, but it doesn't work on the Droid X when the phone has been put into sleep mode. What I have discovered is that the timer seems to pause when the phone is in sleep. It doesn't seem to do this on the Droid 1, or the emulator. I'm sure the workaround isn't too difficult, so I'm not asking for help (for once) I just want an explanation, to better understand this. My question is what exactly does "sleep mode" do

Android Sleep/Standby Mode

自古美人都是妖i 提交于 2019-11-26 03:37:22
问题 I have made an app that starts a service, which starts a timer, which fires off a small function after an amount of time. This is working great on the emulator and on the Motorola Droid 1, but it doesn\'t work on the Droid X when the phone has been put into sleep mode. What I have discovered is that the timer seems to pause when the phone is in sleep. It doesn\'t seem to do this on the Droid 1, or the emulator. I\'m sure the workaround isn\'t too difficult, so I\'m not asking for help (for