[blink-dev] Intent to Ship: Battery Status API

60 views
Skip to first unread message

Tim Volodine

unread,
Aug 7, 2014, 10:49:18 AM8/7/14
to blink-dev
Contact email:

Specification:

Summary:
The Battery Status API provides the ability to obtain the device battery information such as level, charging state and charging/discharging times and to receive notifications when these attributes change.

Intent to implement:

Is this feature supported on all five Blink platforms (Windows, Mac, Linux, Chrome OS and Android)?
Yes

Demo link:

Debuggability:
We might consider adding some support for setting simulated battery values for debugging on devices which don't have a battery.

Compatibility risk:
The previous version of this API has shipped only in Firefox. Since then we have amended the specification to be asynchronous, i.e. using a promise. We have discussed the modified version of the specification with Mozilla and the W3C DAP working group extensively (on public-de...@w3.org). Mozilla has agreed with the modification.

OWP launch tracking bug:

Link to entry on the feature dashboard:

thanks,
Tim

PhistucK

unread,
Aug 7, 2014, 1:56:28 PM8/7/14
to Tim Volodine, blink-dev
Does Mozilla have concrete plans to implement and ship the updated API?


PhistucK


To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

Ehsan Akhgari

unread,
Aug 7, 2014, 3:06:42 PM8/7/14
to PhistucK, Tim Volodine, blink-dev
On Thu, Aug 7, 2014 at 1:55 PM, PhistucK <phis...@gmail.com> wrote:
Does Mozilla have concrete plans to implement and ship the updated API?




--
Ehsan

PhistucK

unread,
Aug 7, 2014, 3:14:45 PM8/7/14
to Ehsan Akhgari, Tim Volodine, blink-dev
This is great!


PhistucK

Eric Seidel

unread,
Aug 7, 2014, 3:52:17 PM8/7/14
to PhistucK, Ehsan Akhgari, Tim Volodine, blink-dev
LGTM. But I'm not sure your demo works on mac... It appears to have
a divide by zero problem?

Battery Status API
________________________________
charging false
chargingTime Infinity
dischargingTime Infinity
battery level1
________________________________
promise status success
number of updates 3

PhistucK

unread,
Aug 7, 2014, 4:17:21 PM8/7/14
to Eric Seidel, Ehsan Akhgari, Tim Volodine, blink-dev
It does not seem to work for me (a Windows 7 Enterprise notebook), too -
Battery Status API
charging true
chargingTime 0 (0h:0m:0s)
dischargingTime Infinity
battery level 1
promise status success
number of updates 1

At first I was charging, but I unplugged it and nothing changed. I waited a minute or so and refreshed. Nothing changes. I restarted the browser. Same result.

:(


PhistucK

Tim Volodine

unread,
Aug 7, 2014, 4:33:36 PM8/7/14
to PhistucK, Eric Seidel, Ehsan Akhgari, blink-dev
eseidel@:
It should work on mac, the Inf values are reported when the chargingTime/dischargingTime are not known. If you wait a bit longer the dischargingTime should update, same for chargingTime when it's charging.

phistuck@:
the patch for windows hasn't landed yet, it's currently under review.
(it should work if you patch it locally).

PhistucK

unread,
Aug 7, 2014, 4:50:33 PM8/7/14
to Tim Volodine, Eric Seidel, Ehsan Akhgari, blink-dev
Your intent says it is supported on all of the platforms...
Do you intend to ship it only after the Windows implementation receives some testing?
Also, the Android issue is not marked as fixed yet - crbug.com/360068 - is the implementation complete there?


PhistucK

Tim Volodine

unread,
Aug 11, 2014, 2:42:53 PM8/11/14
to PhistucK, Eric Seidel, Ehsan Akhgari, blink-dev
yes, of course we will make sure it is tested before it ships.
I have marked the mentioned android bug as fixed now.

Can we get more LGTMs on this thread to ship this api?
I think at least 2 more lgtms are required.

thanks,
Tim

Darin Fisher

unread,
Aug 11, 2014, 3:16:59 PM8/11/14
to Tim Volodine, blink-dev, Eric Seidel, Ehsan Akhgari, PhistucK

LGTM

Adam Barth

unread,
Aug 11, 2014, 3:20:32 PM8/11/14
to Darin Fisher, Tim Volodine, blink-dev, Eric Seidel, Ehsan Akhgari, PhistucK
LGTM
Reply all
Reply to author
Forward
0 new messages