incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Muhammad Siddiq Akbar (Created) (JIRA)" <>
Subject [jira] [Created] (CB-186) batterystatus event does not fire on iPod
Date Thu, 19 Jan 2012 10:32:41 GMT
batterystatus event does not fire on iPod

                 Key: CB-186
             Project: Apache Callback
          Issue Type: Bug
          Components: iOS
    Affects Versions: 1.3.0
            Reporter: Muhammad Siddiq Akbar
            Assignee: Shazron Abdullah
            Priority: Blocker

This is my index.html:

<!DOCTYPE html>
    <title>PhoneGap Device Ready Example</title>

    <script type="text/javascript" charset="utf-8" src="phonegap.js"></script>
    <script type="text/javascript" charset="utf-8">

    // Call onDeviceReady when PhoneGap is loaded.
    // At this point, the document has loaded but phonegap.js has not.
    // When PhoneGap is loaded and talking with the native device,
    // it will call the event `deviceready`.
    function onLoad() {
        document.addEventListener("deviceready", onDeviceReady, false);

    // PhoneGap is loaded and it is now safe to make calls PhoneGap methods
    function onDeviceReady() {
        window.addEventListener("batterystatus", onBatteryStatus, false);

    // Handle the batterystatus event
    function onBatteryStatus(info) {
        console.log("Level: " + info.level + " isPlugged: " + info.isPlugged); 

  <body onload="onLoad()">

This is my config.xml:

<?xml version="1.0" encoding="UTF-8" ?>
    <widget xmlns = ""
        xmlns:gap = ""
        id        = "com.phonegap.example"
        versionCode="10" <!-- optional: Android only -->
        version   = "1.0.0">

    <name>Accurate Battery Status</name>

        An example for phonegap build docs. 

    <author href="" email="">

    <feature name=""/>
    <feature name=""/>
    <feature name=""/>
    <feature name=""/>
    <feature name=""/>
    <feature name=""/>
    <feature name=""/>
    <feature name=""/>


This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message