On 11/06/2013 12:09, Alive Kuo wrote:
> Vivien <
vnic...@mozilla.com> 於 2013/6/11 下午6:01 寫道:
>
>> I like the idea of letting an app control the lockscreen but I'm not
>> convinced (maybe yet!) that it fits here. I'm not a big fan of adding a
>> new API for that but a widget system based on process seems painful to
>> me (this is more or less how works the costcontrol app in the
>> notification tray but it will create more issues in this case since the
>> lockscreen is way more often visible).
> IMO in this idea, the visibility state of lock screen widget is:
> 1) True if: lockscreen is on and screen is on.
> *2) False if: unlocked and current active app isn't music app. So we could kill music if memory is tight.*
> 3) True if: current active app is music app.(Widget opener)
I assume 4) False if: screen is off.
What makes me worried is a sequence of 2-4-1: For example the user is
not listening any music, but he/she wrote an email. He got distracted a
few seconds so the phone goes to sleep, or he has to turn off the phone.
Then the user turns the phone on again to finish the email and the
lockscreen is displayed, which result in starting the music app which
can kill the email app behind.
All those happens even if the user is not listening any music :/
(Also this is without speaking of the difficulties to have the 'widget'
beeing loaded smoothly on the lockscreen).
The API mechamism will let the UI beeing part of the lockscreen and so
one music app will be allow to be opened and controlled by it (could be
a setting like the homescreen / keyboard). The music app won't be opened
if the user is not listening music and the no extra memory consumption
app will be involved.
Maybe a Media API is wrong and a generic API, close too but not system
message, can address this issue. As a side effect it could potentially
let us get rid of the dirty little code that opens the settings in the
notification tray. As well as a way to address wired/bt headset buttons
to a specific app without waking up all the listeners.
Again I really like the idea of letting an application (even a third
party app) takes over a part of the lockscreen to display custom things.
But widgets-like mechanism makes me uncomfortable in a world where
memory is rare. I would prefer a data-store based mechanism where the UI
of the 'widget' is already present into the lockscreen / notification
panel and where third party apps can feed it with their own data. That
would be memory efficient and could offer a wide range of built-in
capabilities.