ubuntu-phone team mailing list archive
-
ubuntu-phone team
-
Mailing list archive
-
Message #04757
Re: Thoughts on inhibiting app suspend via application lifecycle
Some thoughts:
There definitely are legitimate reasons to let apps run in the background.
A game on Android I like very much is Turf, it uses the GPS to track you
when you goes around and take "zones". While playing, I usually listens
to music. And bam, a common use case where we want two apps in the
background (maybe I gets a SMS and don't change back to one of the apps
I'm "using").
So app definitely needs a way to run in the background and prevent sleep.
I think Android solves this very good using Activity’s and Services. An
activity is what shows the graphical interface, everything you see is an
activity. Activitys can't run in the background. Services however can't show
any graphical interface but can tun in the background.
This is good as it forces developers to write good behaving background
services (in the meaning of, it doesn't do any graphical stuff when not in
the foreground).
To this Android also have a battery menu in the system settings that show
how much battery every app have been using, which makes it easy to find
out which app drained my battery.
There are other use cases than GPS and music, apps that download stuff
for example (http, torrent, or whatever), apps that measures the
accelerometer and finds out when I'm sleeping very light.
Personally I don't think a crippled way of running background tasks is the
best way to fix battery issues, instead let the user choose and help him
do it by displaying as much information ass possible.
Maybe there could be a setting in the battery menu "let apps run in the
background" that would make it possible for people to save as much
battery as possible if they want.
A default setting could be to disable this when the battery reaches 15%
or something.
2013/10/22 Alberto Mardegan <alberto.mardegan@xxxxxxxxxxxxx>
> On 10/22/2013 09:59 AM, Thomas Voß wrote:
> > Along the same lines of the metronom app: If the gps app is in
> > foreground, the location service should signal to powerd that it
> > should not suspend at least the gps, probably the network, CPU (and
> > thus, memory access).
>
> Why does it matter if the app is in the foreground or background? A
> navigation app needs to continue runnint anyway, even if it's in the
> background.
> Shouldn't the location service also signal to the shell (or to whatever
> component is responsible for apps lifetime) that the app is using the
> GPS and shouldn't be stopped?
>
> (if not: how would you solve this use case?)
>
> Ciao,
> Alberto
>
> --
> Mailing list: https://launchpad.net/~ubuntu-phone
> Post to : ubuntu-phone@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~ubuntu-phone
> More help : https://help.launchpad.net/ListHelp
>
--
Rasmus Eneman
Follow ups
References