Closed
Bug 1054113
Opened 10 years ago
Closed 4 years ago
Firefox for Android should support W3C WakeLock API
Categories
(Firefox for Android Graveyard :: General, enhancement, P5)
Tracking
(fennec+)
RESOLVED
INCOMPLETE
Tracking | Status | |
---|---|---|
fennec | + | --- |
People
(Reporter: wlach, Unassigned)
References
(Blocks 1 open bug)
Details
(Keywords: dev-doc-needed, parity-chrome, Whiteboard: [lang=js])
I recently wrote up a meditation application and uploaded it to the Firefox marketplace:
https://marketplace.firefox.com/app/meditation
Unfortunately it doesn't work particularly well on Android, because the screen turns off while the timer is counting down and the end "chime" sound never plays. On FirefoxOS, I used the requestWakeLock API to avoid this problem:
https://developer.mozilla.org/en-US/docs/Web/API/Navigator.requestWakeLock API
... it would be great if Firefox for Android supported this as well.
Reporter | ||
Updated•10 years ago
|
tracking-fennec: --- → ?
Comment 1•10 years ago
|
||
This should be trivial. Add the wakelock pref (dom.wakelock.enabled) to the list of things to turn on in apps:
http://mxr.mozilla.org/mozilla-central/source/mobile/android/chrome/content/WebappRT.js#27
If you have time/environment to do that, you're in a much better place to test the api than anyone else :)
Mentor: wjohnston
Reporter | ||
Comment 2•10 years ago
|
||
(In reply to Wesley Johnston (:wesj) from comment #1)
> This should be trivial. Add the wakelock pref (dom.wakelock.enabled) to the
> list of things to turn on in apps:
>
> http://mxr.mozilla.org/mozilla-central/source/mobile/android/chrome/content/
> WebappRT.js#27
>
> If you have time/environment to do that, you're in a much better place to
> test the api than anyone else :)
I wonder if this should be usable by regular web pages as well though? As long as release the lock when the webpage is left, we should be fine, right? This is the way it works for FirefoxOS.
Flags: needinfo?(wjohnston)
Comment 3•10 years ago
|
||
Hmm... that would be interesting. I don't know enough about the topic to comment. Probably a good dev-platform post to see what people think.
The fix should also try and make sure the apk factory is updated to include the wake_lock pref is apps request it:
<uses-permission android:name="android.permission.WAKE_LOCK"/>
Flags: needinfo?(wjohnston)
Comment 4•10 years ago
|
||
tracking+ for now, but we can track for a release if we decide to do a webapp API-focused release.
tracking-fennec: ? → +
Comment 6•10 years ago
|
||
Sounds like fixing this bug would just involve flipping a pref and doing some testing.
Whiteboard: [lang=js]
Reporter | ||
Comment 7•10 years ago
|
||
(In reply to :Margaret Leibovic from comment #6)
> Sounds like fixing this bug would just involve flipping a pref and doing
> some testing.
Yup, I think so. I really haven't had the time/inclination to work on it myself, but it would likely make a good first bug for someone who wants to get started. To test that it works, maybe just install my meditation app (https://marketplace.firefox.com/app/meditation/) and do a 5 minute session. Make sure the screen stays on for the duration.
Comment 8•9 years ago
|
||
There is now a W3C API for wake lock management: http://w3c.github.io/wake-lock/
It has been added an experimental feature in Chromium: https://codereview.chromium.org/1107333002/
Updated•8 years ago
|
Mentor: wjohnston2000
Updated•5 years ago
|
Comment 10•5 years ago
|
||
Changed title as the API's request method keeps changing :)
Summary: Firefox for Android should support Navigator.requestWakeLock API → Firefox for Android should support W3C WakeLock API
Updated•5 years ago
|
Type: defect → enhancement
Updated•5 years ago
|
Keywords: parity-chrome
Updated•5 years ago
|
Keywords: dev-doc-needed
Comment 11•4 years ago
|
||
We have completed our launch of our new Firefox on Android. The development of the new versions use GitHub for issue tracking. If the bug report still reproduces in a current version of [Firefox on Android nightly](https://play.google.com/store/apps/details?id=org.mozilla.fenix) an issue can be reported at the [Fenix GitHub project](https://github.com/mozilla-mobile/fenix/). If you want to discuss your report please use [Mozilla's chat](https://wiki.mozilla.org/Matrix#Connect_to_Matrix) server https://chat.mozilla.org and join the [#fenix](https://chat.mozilla.org/#/room/#fenix:mozilla.org) channel.
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → INCOMPLETE
Assignee | ||
Updated•4 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•