cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (CB-6065) alignment with W3C Battery API
Date Wed, 24 Jun 2015 14:24:04 GMT


ASF GitHub Bot commented on CB-6065:

GitHub user Uldax opened a pull request:

    Alignment with W3C Battery API

    Addition of the methode navigator.getBattery which return a BatteryManager object using
promises to align with the [W3C API](
    Here is the associate  [Jira issue](
    Some notes on the proposed changes:
    * The previous navigator.battery and the new navigator.getBattery can't run together on
android ( only one callbackContext allowed with the current version)
    * chargingtime and dischargingtime value aren't available for now (since that data is
not provided by default at least on Android and FirefoxOS)
    Also, I was not clear whether there is  a coding guideline (formatting, etc) ? I tried
to keep it close to the original

You can merge this pull request into a Git repository by running:

    $ git pull CB-6065cordova-plugin-battery-status

Alternatively you can review and apply these changes as the patch at:

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #24
commit a020f8fb4d55028bf4a44a3638a82d406703ecb6
Author: pcontat <>
Date:   2015-06-22T09:08:17Z

    CB-6065 Initialisation
    - CB-7583 : readonly property called charging
    - CB-7589 : readonly property called level
    - CB-7585 : readonly property called chargingTime
    - CB-7587 : readonly property called dischargingTime
    - CB-7581 : The W3C battery status specification uses promises.

commit 29803994a8672d18330430dd1a9de5d0babc0d41
Author: pcontat <>
Date:   2015-06-22T09:47:40Z

    CB-7581 and CB-7584 : eventHandler and access to batteryManager
    - CB-7581 : Battery information should be accessible from navigator.getBattery()
    - CB-7584 : event handler: onchargingchange

commit 70b086f3d21638e421576c13114662bf4512daaf
Author: pcontat <>
Date:   2015-06-22T11:05:24Z

    CB-7586 chargingTimeChange event

commit 71675c608ebe64c5698eda69a00a9239e351e85b
Author: pcontat <>
Date:   2015-06-22T12:53:01Z

    CB-7588 and CB-7590 : dischargingTimeChange, levelchange  event

commit 4df41149252f5be4763d978cc2f4eaa0a5be7a24
Author: pcontat <>
Date:   2015-06-23T13:04:16Z

    BatteryManager implement EventTarget using cordova chanels

commit 2354a7ee65265ee552b5fd0084c0a1745bce9dae
Author: pcontat <>
Date:   2015-06-23T13:44:37Z

    Add test for new implementation

commit 3cc6bb3f81ccef18f257027258cd17017dc0a300
Author: pcontat <>
Date:   2015-06-24T13:34:05Z

    CB-7589 : level between 0 and 1.0 and add manual test


> alignment with W3C Battery API
> ------------------------------
>                 Key: CB-6065
>                 URL:
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: Plugin Battery Status
>            Reporter: Dominique Hazael-Massieux
> As indicated in
, the current battery plugin implements an old version of the W3C Battery API. 
> The latest version is at Candidate Recommendation
status, so it is now deemed to be stable, so it would be great if the battery plugin could
be aligned with it.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message