← Back to team overview

ubuntu-phone team mailing list archive

Re: Background services: a problem that we need to face

 

See inline

Am 26.06.2014 16:29 schrieb "Benjamin Zeller" <benjamin.zeller@xxxxxxxxxxxxx
>:
>
> Am 26.06.2014 14:36, schrieb Michael Zanetti:
> > On Wednesday 25 June 2014 12:47:02 Marc Deslauriers wrote:
> > [snip]
> >> As I said, I don't want to prevent background services, I want us to
do it
> >> in a way that most people would find reasonable, and using the
principle of
> >> least astonishment. I'm pretty sure when people close their flashlight
app,
> >> they don't expect it to be running in the background and tracking their
> >> location.
> > That's why I for one (as a user and a developer) would be really happy
with
> > the option for the user to allow an app to be kept running (as in
running, not
> > suspended). Sort of like this:
> >
> > An app indicates that it has features which require to keep running and
> > processing data. If the user starts that app for the first time, the
system
> > asks the user: "App X asks for permission to keep processing data even
while
> > the display is off. Please note that this might affect your battery
lifetime.
> > Accept/Decline. (You can change this setting in the system settings at
any
> > time)".
> Great idea, you could do the same with a background service, when its
> started
> the first time the user is told about it and can always change his
> decision in the
> settings.
> >
> > If the user declines, the app will be suspended when unfocused and some
> > features might not work. If the user agrees, the app would not be
suspended
> > and support all the use cases that came up in this thread. However, if
the
> > user closes the app's window, that would also stop the process in any
case.
> > That would make it quite clear to the user what's running and what
isn't.
> Hm we could have the same behaviour if we require the bg process to be in
> the same process group and terminate the whole group when closing the app.
> That way we get background tasks without the full application running
> all the time.
>
> >
> > I'd also be fine if this question only pops up if the user has
qualified as
> > power user (e.g. a setting to enable this advanced stuff) and just
decline it
> > automatically for non tech savvy people.
> But how should the user know about the not working features if the dialog
> does not pop up because he did not select "poweruser" mode?

Maybe a settings screen like android has to allow notification access could
be a solution. The app could point to this screen and the user would have
to make a tick.
See attached screenshots.

> >
> > If the developer needs to do things even when the app is completely
closed,
> > that's when a set of restrictive, predefined system services like push
> > notifications etc should help out.
> >
> >
> > I'm not really concerned about the app being quit by the out of memory
killer.
> > If we're out of memory we're out of memory, there's not much we can do
about.
> > Maybe the OOM killer could try to stop non-background enabled apps
before
> > others and try to be smart in order to minimze the risk of interrupting
such a
> > background task...
> Yep
> >
> > br,
> > Michael
>

Writing system services for every possible background task is way to much
work for the Ubuntu phone developers.

Regards
Christian

Attachment: Screenshot_2014-06-26-16-52-26.png
Description: PNG image

Attachment: Screenshot_2014-06-26-16-52-23.png
Description: PNG image

Attachment: Screenshot_2014-06-26-16-52-02.png
Description: PNG image


References