Resurrecting this thread a bit: There are definitely valid use cases for apps to be able to intercept the volume buttons, and for them to listen for (but probably not cancel) the sleep button.

In clock, for instance, right now I can only see that the phone fell asleep -- I can't tell if the user pressed the power button (in which case the alarm should snooze) or if the screen just timed out.

I can already do hackish things to listen for volume button changes (and intercept them by changing the volume to whatever it was before the change). We'd like to snooze the alarm if the user presses the volume buttons while the phone is ringing.



On 2/23/14, 4:28 AM, Vivien Nicolas wrote:


On 19/02/2014 17:45, Jonas Sicking wrote:
On Feb 12, 2014 3:20 AM, "Vivien Nicolas" <[email protected]
<mailto:[email protected]>> wrote:
 > On 12/02/2014 05:33, [email protected]
<mailto:[email protected]> wrote:
 >>
 >> * (As I understand) all agrees on delivering volume key events to app
 >> and blocking sleep and home button at system app level.
 >
 >
 > We should definitively block the 'home' button.  But for the 'sleep'
button I'm in favor of letting it goes down to the app. The use case
here is the Camera app. The button can be used as the button to take a
picture when you are in landscape mode.

No, we should be able to promise the user that at all times, pushing the
sleep button should turn off the screen and most hardware.


Pressing the sleep button a long time should always turn off the phone.

I think it's a nice feature to be able to control it for some use case
and it can be put beside a permission. But, if you guys feels
differently I'm not going to spend hours trying to convince you as we
have much more pressing subjects and in a few years I may come back on
that :)

Even security aside, it seems annoying and hard-to-find to have to exit
to the home screen in order to put the phone to sleep from the camera
app.

/ Jonas

_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g
_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g

Reply via email to