← Back to team overview

ubuntu-phone team mailing list archive

Re: Thoughts on inhibiting app suspend via application lifecycle

 

On 10/27/2013 08:08 PM, Thomas Voß wrote:
>> I think we are misunderstanding; I'm not saying that the user should be
>> asked (at install time or at run time) for granting a permission. There
>> would be a policy groups "background_gps", "background_music" which the
>> app developer can declare in its manifest file. Then, if the application
>> is defocused while it's using the GPS or playing music, it wouldn't be
>> stopped. If it's not using the GPS or playing music, it will be stopped.
>> It seems much simpler to me, and I don't see what could go wrong here.
> 
> What prevents every app from just doing that? One example: When iOS
> had the policy of an app playing music not being suspended, a lot of
> applications just looped a whitenoise sound file to not be suspended.

OK, this looks like a very strong point not to allow music applications
to be run in the background, but provide them with a background service.
Unless there is a non-costly way of detecting the case where an
application has been playing an almost silent sound for the last minute.

However, I still think that we shouldn't apply the same rule for the
GPS. Here if one application declares that it' using it just for the
sake of keeping running in the background, the user has a visible
indicator for it, and can deactivate the GPS. Also writing a system
background service for the GPS is much more difficult than writing a
background service for playing sounds (for the GPS, we have much more
complex logic).

Ciao,
  Alberto



Follow ups

References