← Back to team overview

ubuntu-touch-coreapps team mailing list archive

Re: [Ubuntu-phone] Allowing Apps to control the screen display

 

As a further twist on Victor's proposal:

Let's have a system setting option where the user can choose *ONE* app
to be run when the phone is on the cradle, or charging.
It will default to the clock, but it can be set to say, a slideshow
gallery. Or to None, if the user wishes the phone screen to be off.

So, instead of each app having to care about power management, some
system daemon will:
- listen for "charging" events
- inhibit suspend
- start that chosen app
and viceversa when the cable is unplugged.

PS: In Android there's a similar mode called "Daydream".

cheers,
-- 
alecu

On Wed, Jun 4, 2014 at 10:43 AM, Victor Thompson
<victor.thompson@xxxxxxxxx> wrote:
> Hi Nik,
>
> Instead of having the application use powerd. I think a better solution that
> would fit any use case of an app would be to have an option in the system
> settings to leave the screen on when power is connected. This is how my
> Android device, for instance, accomplishes this. Also, the QtPowerd plugin
> that the music app used was non-functional and the only reason the music app
> worked was because it has a life cycle exception. The plugin would probably
> need to be fixed if we were to use it.
>
> Victor
>
> On Jun 4, 2014 8:25 AM, "Nekhelesh Ramananthan" <krnekhelesh@xxxxxxxxx>
> wrote:
>>
>> Hey everyone,
>>
>> During the sprint at Malta, we were given new designs for the clock app.
>> It introduces a new mode called the "Night Mode" where the user can use the
>> phone as a clock stand. In the Night Mode, the clock app will show a basic
>> clock with all other UI elements hidden and also use a dark background. It
>> is however important that the screen remains on all the time. I still need
>> to confirm with design, how long they want the screen to be on. As I
>> understand, currently it is not possible for an app to request the screen to
>> be on. I discussed this with Jamie Strandboge and Jim Hodapp. I was told
>> that the media-hub makes dbus calls to powerd to keep the screen on when a
>> video is being played on the phone. So I am hoping we can do something
>> similar for the clock app.
>>
>> Jamie informed me that 3rd apps cannot make direct calls to powerd while
>> being confined. So there are some options that come to mind,
>>
>> Let the clock app run unconfined to make direct calls to powerd. This was
>> also done by the music-app until recently when they switched to music-hub.
>> It is not the ideal situation as advised by Jamie.
>> Create a restricted policy group which allows making calls to powerd.
>> Implement a intermediary (power-hub) in between confined apps and powerd
>>
>> The best temporary solution may be the restricted policy group in my
>> opinion. However I feel that the 3rd solution might be a better option in
>> the long run since 3rd apps might like to have that control as well.
>>
>> Hopefully we can discuss here what other solution are available and come
>> to a resolution soon.
>>
>> Cheers,
>> Nekhelesh
>>
>> --
>> Mailing list: https://launchpad.net/~ubuntu-touch-coreapps
>> Post to     : ubuntu-touch-coreapps@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~ubuntu-touch-coreapps
>> More help   : https://help.launchpad.net/ListHelp
>>
>
> --
> 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
>


Follow ups

References