Closed
Bug 699743
Opened 13 years ago
Closed 13 years ago
Implement battery.chargingTime
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla11
People
(Reporter: mounir, Assigned: mounir)
References
Details
Attachments
(2 files)
8.09 KB,
patch
|
sicking
:
review+
asa
:
approval-mozilla-aurora-
|
Details | Diff | Splinter Review |
1.27 KB,
text/plain
|
Details |
This has been added to the specs while implementing the first version of Battery API. The only issue I see with this new property is that it will tell the author whether or not the device has a battery coupled to battery.dischargingTime (both will return Infinity if there is no battery).
Assignee | ||
Updated•13 years ago
|
Status: NEW → ASSIGNED
Whiteboard: [needs review]
Comment on attachment 572426 [details] [diff] [review] Add .chargingTime in the DOM Review of attachment 572426 [details] [diff] [review]: ----------------------------------------------------------------- r=me
Attachment #572426 -
Flags: review?(jonas) → review+
Assignee | ||
Updated•13 years ago
|
Flags: in-testsuite?
Whiteboard: [needs review]
Assignee | ||
Comment 3•13 years ago
|
||
Comment on attachment 572426 [details] [diff] [review] Add .chargingTime in the DOM This has just landed in mozilla-inbound. Requesting aurora approval for API completeness in Firefox 10. It would be better to ship Firefox 10 with the entire API if we say it is present. The risk is very low given that there is no use of the API for the moment.
Attachment #572426 -
Flags: approval-mozilla-aurora?
Comment 4•13 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/42f490a7566a
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla11
Comment 5•13 years ago
|
||
This is the test page I'm presently using (and planning to do so with our community also) to test battery api in it's most recent state. Implements .chargingTime and .dischargingTime
Comment 6•13 years ago
|
||
"This has been added to the specs while implementing the first version of Battery API. The only issue I see with this new property is that it will tell the author whether or not the device has a battery coupled to battery.dischargingTime (both will return Infinity if there is no battery)." I'm not sure this is working as it should. In my battery app (shown above) both .dischargingTime and .chargingTime show Infinity. Even though there is a battery and it's reading other values from it. Is there something else I must do explicitly in my JS code to couple the battery to b.dischargingTime/.chargingTime ?
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 7•13 years ago
|
||
Please, do not reopen a bug if you see something isn't working, open a new bug instead. However, I believe this is working (even if not perfect). The issue is that on Android, we get a battery update every 1% change which means we have to get 2% change before being able to estimate the charging/discharging time. This can be a bit long. In addition, we do not listen to battery events when we are on background which makes thing a bit more long (and wrong sometimes). So please, check that your level correctly increase/decrease and when you have at least 2% change, one of the dischargingTime/chargingTime values should change from Infinity to something. At least, I can confirm it's working on my phone.
Status: REOPENED → RESOLVED
Closed: 13 years ago → 13 years ago
Resolution: --- → FIXED
Comment 8•13 years ago
|
||
Comment on attachment 572426 [details] [diff] [review] Add .chargingTime in the DOM It looks like this feature wasn't ready for 10. Please re-nominate if you have a good justification for trying to get this into 10 rather than just waiting for 11.
Attachment #572426 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora-
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•