← Back to team overview

ubuntu-phone team mailing list archive

Re: Thoughts on inhibiting app suspend via application lifecycle

 

Hi,

Am 25.10.2013 19:48, schrieb Thomas Voß:
> One thing that strikes me: Instead of trying to solve the problem a
> lot of "won't work" statements are made in this thread, going along
> with a request for removing all of the lifecycle policies. And to be
> clear: With strict policies in place, it is always possible to find an
> example that breaks. So I think we can stop collecting breaking
> examples here.

I disagree. If you want Ubuntu Touch to be successful, you need users.
And users want apps. In order to be able to offer a rich selection of
apps, you also need app developers. Limiting app developers to basically
create wrappers around system services might alienate them.

Sure, in order to avoid the android background service mess, a strict
lifecycle policy is required and I like most of your ideas. Create
powerful system services that make it possible to do stuff easily and in
a power-efficient way.

But there *are* apps where "one size fits all" doesn't work and
something like an actual background service (or wakelock & no suspend)
is required. Any app developer who whishes to create such an app will be
unhappy and might consider not creating anything for Ubuntu Touch at all.

The more "breaking examples" we can enumerate, the more app developers
are possibly affected. Let me add one breaking example that sells (from
my "poor student" POV) relatively well on Google Play and had more than
200k downlods and a rating of 4.5/5 in the short time span when it was a
free download, so there is an interested user base for something like that.

The app takes a file produced by some other popular app. That file grows
larger than a few MBs quite fast. The file's content is analyzed and the
app creates statistics based on the file contents. Since that process
can easily take a few minutes (sometimes 20 minutes) even on modern
hardware, it is done in a background process while holding a (partial)
wakelock. Every night the statistics are updated (taking <1 min
usually), triggered by an alarm and while holding a (partial) wakelock.

The only possible solution for this on Ubuntu Touch? "Please wait. ETA:
20 mins. Also, please touch the display once every 30 sec and don't
leave this app. Thank you."


I suggest allowing background services, but only if the developer can
state a very good reason when doing the upload and generally advice
against using it whenever possible. This would need some kind of
pre-approval so dev work is not wasted in case the approval fails. I
think most apps work without the background service, so it's not a lot
of review work. Also, if a background service is active, indicate that
to the user (or maybe only after ~30sec of activity) and allow them to
cancel the operation and disable background work for that app.

Cheers,
Florian


Follow ups

References