-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Battery API experiment #26
Comments
Doh! I really need to improve my Bugzilla skills. Thanks for pointing out that there is indeed an existing bug for it, and for cross referencing the Bugzilla bug and this issue here. I'm already busy at work with
|
v0.2 of my proposal (which marks the addition of the four aforementioned Events) can be found in the Events branch now (will merge to master after some further clean-up). I've found one issue that may, however, be Windows specific (from what I remember, it worked fine on a Macbook Air I borrowed. Will have to re-check once I get back home). |
https://github.com/Happy-Ferret/ext-battery
Provides functions to query a device's battery status (current battery charge level, charging status -- whether the device is plugged in or running on battery -- time left, time to fully charge).
Not that I can see.
Yes.
On that note: I usually release my code under BSD3. Is it possible to do that or will I need to re-license as MPL2?
Currently, the returned values for all functions are rather verbatim. As opposed to the old BatteryManager API, I made the decision to return values that are already fairly informational but might make it harder to process further.
i e where
BatteryManager
'scharging
property would return eithertrue
orfalse
,browser.battery.getStatus()
currently returnsPlugged-in/charging
orRunning on battery
.I realize now that's not exactly ideal for, say, l10n, so I'm open for suggestions on that front (I could either return
true
orfalse
here or, perhaps,Adapter
/Battery
.TODO: I still plan on implementing Events.
The text was updated successfully, but these errors were encountered: