|
|
|
|
|
by swiley
2104 days ago
|
|
Here’s how I have mine set up: The phone is suspended when the power button is pressed. Reciving network traffic (ex responses to IDLE on an open IMAP connection) wakes it up and there’s a service that suspends it again fairly quickly if the power button hasn’t been pressed. Another service manages an RTC alarm so that programs expecting pushed data can reestablish sockets if they die (since that won’t necessarily wake the phone.) The only disadvantage to this scheme is that there are more keepalive messages sent (so you should limit the number of services expecting push messages to just a few.) Mine runs a normal X11 DE (fluxbox) so the apps run in the background just like they do on my laptop. If something wakes the phone up too often just kill it. I’m still working out the kinks but it seems to get decent battery life this way. No need for some special API. |
|
How can you listen to network events while being suspended ? I thought that on linux suspend = all user processes stopped. Does it somehow wake up every nth second to check if there a new message from the network ?