← Back to team overview

ubuntu-phone team mailing list archive

Re: Thoughts on inhibiting app suspend via application lifecycle

 

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 10/22/2013 01:46 AM, Jamie Strandboge wrote:
> I think we may be too strict on this. Consider the following apps: 
> * a metronome app for musicians to practice to (2 are in the app
> store now) * a white noise app to help people sleep (1 in the
> store) * a navigation app that speaks the directions to you as you
> drive (none in the app store AFAIK, but this would be a wonderful
> addition) * internet radio apps (there are at least 2 in the
> store) * a 3rd party alarm clock (perhaps the API that the core app
> clock uses is sufficient-- I haven't checked)
[...]
> Do we have a plan for apps like this? If not, could we create an
> API that allows inhibiting reasonably? Note, there was a related
> thread ('Catching CPU run-aways on Touch') that might be useful to
> take a look at if we are going to implement this.

The case of an application using the GPS is interesting. The nice
thing here is that the system can know that the GPS is on and that the
application is listening to it, so it could let the application run
even when in the background, without the need for a specific policy flag.
Conversely, if the GPS is off, there's generally no point in letting a
GPS application to continue running, and it could be stopped.

And maybe we could have something similar for music apps? While there
are many applications which could emit sounds, some need to continue
playing while in the background (music player, metronome, etc.), while
some don't (videogame).
So, we could have a specific policy for apps who declare to be music
players (or more generically, whose main task is to produce a sound),
which makes it so that the app will not be stopped if it is currently
playing (there should be ways to detect this as well). And again,
conversely, such an app could be stopped if it gets in the background
when it's not playing music.

(where I used the expression "in the background" you can extend it
with "or the display gets turned off")

I think this would be much easier than using the music hub: both for
the developer, which doesn't have to change its code just for Ubuntu
Touch, and probably for us as well.

Ciao,
  Alberto
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlJmFfsACgkQVLQegMXeCFLs5ACdEgO5u5ihdMiMgGip9eoNQQof
DeQAnjKmQAtWbo2uLK7PFVTKGNDhRFRe
=fxep
-----END PGP SIGNATURE-----


Follow ups

References