|
|
|
|
|
by gitua
2104 days ago
|
|
I'm really curious how Push Notification, App LifeCycle, Localisation Services, Background App/Services, etc. are going to be implemented on Linux phones. Is each app going to be killed when not in foreground ? Or are they all going to keep running ? Is there going to be special API for background download manager, notification listening, music playing, etc. or is each app going to keep running in background and do its own stuff like on Desktop ? For Google & Apple things are super easy : they do what they want. But For Linux Phones, people from KDE, Gnome, Wayland, Purism, etc. will have to agree on services & APIs which might take lots of time |
|
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.