You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by "Filip Maj (Created) (JIRA)" <ji...@apache.org> on 2012/01/13 00:29:40 UTC

[jira] [Created] (CB-173) Battery events not working properly on HTC Inspire running 2.2

Battery events not working properly on HTC Inspire running 2.2
--------------------------------------------------------------

                 Key: CB-173
                 URL: https://issues.apache.org/jira/browse/CB-173
             Project: Apache Callback
          Issue Type: Bug
          Components: Android
    Affects Versions: 1.3.0
         Environment: HTC Inspire, Android 2.2
            Reporter: Filip Maj


Originally reported by Ray Camden:


Trying to get a very simple battery status app working. None of my events ever fire. According to the docs, batterystatus should fire when plugging/unplugging a device, but that doesn't trigger it either. Any ideas? HTC Inspire, Android 2.2 SDK. Code below. Note the alert in my battery status callback. I did that in case I screwed up something simple in drawStatus.


<!DOCTYPE HTML>
<html>
  <head>
    <meta name="viewport" content="width=320; user-scalable=no" />
    <meta http-equiv="Content-type" content="text/html; charset=utf-8">
    <title>Minimal AppLaud App</title>

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

		var drawStatus = function(info){
			var s = "<p><b>Battery Status</b><br/>";
			s += "Level is "+info.level + "<br/>";
			s += "Plugged in is "+info.isPlugged;
			s += "</p>";
			status.innerHTML = s;
		};
				
      	var battCrit = function(info) {
			navigator.notification.alert("Your battery is SUPER low!");
			drawStatus(info);
		};

      	var battLow = function(info) {
			navigator.notification.alert("Your battery is low!");
			drawStatus(info);
		};

      	var battStat = function(info) {
			alert('test');
			drawStatus(info);
		};
	  
        var onDeviceReady = function() {
			//listen for battery crit
			window.addEventListener("batterycritical", battCrit, false);
			window.addEventListener("batterylow", battLow, false);
			window.addEventListener("batterystatus", battStat, false);
			alert("registered...");
        };

        function init() {
            document.addEventListener("deviceready", onDeviceReady, true);
			status = document.getElementById("status");
        }   
	  </script>  
  </head>


  <body onload="init();">

    <h2>Battery Tester</h2>

	<div id="status"></div>

  </body>
</html>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-173) Battery events not working properly on HTC Inspire running 2.2

Posted by "Raymond Camden (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13185600#comment-13185600 ] 

Raymond Camden commented on CB-173:
-----------------------------------

This is not a bug with the functionality, but rather a doc bug. The docs do not mention that you need to add this to your plugins.xml file:


    <plugin name="Battery" value="com.phonegap.BatteryListener"/>


                
> Battery events not working properly on HTC Inspire running 2.2
> --------------------------------------------------------------
>
>                 Key: CB-173
>                 URL: https://issues.apache.org/jira/browse/CB-173
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 1.3.0
>         Environment: HTC Inspire, Android 2.2
>            Reporter: Filip Maj
>
> Originally reported by Ray Camden:
> Trying to get a very simple battery status app working. None of my events ever fire. According to the docs, batterystatus should fire when plugging/unplugging a device, but that doesn't trigger it either. Any ideas? HTC Inspire, Android 2.2 SDK. Code below. Note the alert in my battery status callback. I did that in case I screwed up something simple in drawStatus.
> <!DOCTYPE HTML>
> <html>
>   <head>
>     <meta name="viewport" content="width=320; user-scalable=no" />
>     <meta http-equiv="Content-type" content="text/html; charset=utf-8">
>     <title>Minimal AppLaud App</title>
> 	  <script type="text/javascript" charset="utf-8" src="phonegap-1.3.0.js"></script>
> 	  <script type="text/javascript" charset="utf-8">
> 		var status;
> 		var drawStatus = function(info){
> 			var s = "<p><b>Battery Status</b><br/>";
> 			s += "Level is "+info.level + "<br/>";
> 			s += "Plugged in is "+info.isPlugged;
> 			s += "</p>";
> 			status.innerHTML = s;
> 		};
> 				
>       	var battCrit = function(info) {
> 			navigator.notification.alert("Your battery is SUPER low!");
> 			drawStatus(info);
> 		};
>       	var battLow = function(info) {
> 			navigator.notification.alert("Your battery is low!");
> 			drawStatus(info);
> 		};
>       	var battStat = function(info) {
> 			alert('test');
> 			drawStatus(info);
> 		};
> 	  
>         var onDeviceReady = function() {
> 			//listen for battery crit
> 			window.addEventListener("batterycritical", battCrit, false);
> 			window.addEventListener("batterylow", battLow, false);
> 			window.addEventListener("batterystatus", battStat, false);
> 			alert("registered...");
>         };
>         function init() {
>             document.addEventListener("deviceready", onDeviceReady, true);
> 			status = document.getElementById("status");
>         }   
> 	  </script>  
>   </head>
>   <body onload="init();">
>     <h2>Battery Tester</h2>
> 	<div id="status"></div>
>   </body>
> </html>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CB-173) Battery events not working properly on HTC Inspire running 2.2

Posted by "Joe Bowser (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-173?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joe Bowser updated CB-173:
--------------------------

    Fix Version/s:     (was: 1.4.0)
                   1.5.0
    
> Battery events not working properly on HTC Inspire running 2.2
> --------------------------------------------------------------
>
>                 Key: CB-173
>                 URL: https://issues.apache.org/jira/browse/CB-173
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 1.3.0
>         Environment: HTC Inspire, Android 2.2
>            Reporter: Filip Maj
>            Assignee: Steve Gill
>             Fix For: 1.5.0
>
>
> Originally reported by Ray Camden:
> Trying to get a very simple battery status app working. None of my events ever fire. According to the docs, batterystatus should fire when plugging/unplugging a device, but that doesn't trigger it either. Any ideas? HTC Inspire, Android 2.2 SDK. Code below. Note the alert in my battery status callback. I did that in case I screwed up something simple in drawStatus.
> <!DOCTYPE HTML>
> <html>
>   <head>
>     <meta name="viewport" content="width=320; user-scalable=no" />
>     <meta http-equiv="Content-type" content="text/html; charset=utf-8">
>     <title>Minimal AppLaud App</title>
> 	  <script type="text/javascript" charset="utf-8" src="phonegap-1.3.0.js"></script>
> 	  <script type="text/javascript" charset="utf-8">
> 		var status;
> 		var drawStatus = function(info){
> 			var s = "<p><b>Battery Status</b><br/>";
> 			s += "Level is "+info.level + "<br/>";
> 			s += "Plugged in is "+info.isPlugged;
> 			s += "</p>";
> 			status.innerHTML = s;
> 		};
> 				
>       	var battCrit = function(info) {
> 			navigator.notification.alert("Your battery is SUPER low!");
> 			drawStatus(info);
> 		};
>       	var battLow = function(info) {
> 			navigator.notification.alert("Your battery is low!");
> 			drawStatus(info);
> 		};
>       	var battStat = function(info) {
> 			alert('test');
> 			drawStatus(info);
> 		};
> 	  
>         var onDeviceReady = function() {
> 			//listen for battery crit
> 			window.addEventListener("batterycritical", battCrit, false);
> 			window.addEventListener("batterylow", battLow, false);
> 			window.addEventListener("batterystatus", battStat, false);
> 			alert("registered...");
>         };
>         function init() {
>             document.addEventListener("deviceready", onDeviceReady, true);
> 			status = document.getElementById("status");
>         }   
> 	  </script>  
>   </head>
>   <body onload="init();">
>     <h2>Battery Tester</h2>
> 	<div id="status"></div>
>   </body>
> </html>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-173) Battery events not working properly on HTC Inspire running 2.2

Posted by "Steve Gill (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13204183#comment-13204183 ] 

Steve Gill commented on CB-173:
-------------------------------

Sorry for not commenting sooner, I somehow overlooked this thread. 

I just checked this out, and as Joe said, the issue still exists in 1.4.1. I don't believe it is a packaging error though. The XML folder I copy into the release is generated by the create script. Looks like plugins.xml in the framework directory was incorrect, hence why the generated plugins.xml in the example app was incorrect. 

Just tried it on the latest code and it is fixed. Shouldn't see this pop up in the next release.


                
> Battery events not working properly on HTC Inspire running 2.2
> --------------------------------------------------------------
>
>                 Key: CB-173
>                 URL: https://issues.apache.org/jira/browse/CB-173
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 1.3.0
>         Environment: HTC Inspire, Android 2.2
>            Reporter: Filip Maj
>            Assignee: Steve Gill
>             Fix For: 1.5.0
>
>
> Originally reported by Ray Camden:
> Trying to get a very simple battery status app working. None of my events ever fire. According to the docs, batterystatus should fire when plugging/unplugging a device, but that doesn't trigger it either. Any ideas? HTC Inspire, Android 2.2 SDK. Code below. Note the alert in my battery status callback. I did that in case I screwed up something simple in drawStatus.
> <!DOCTYPE HTML>
> <html>
>   <head>
>     <meta name="viewport" content="width=320; user-scalable=no" />
>     <meta http-equiv="Content-type" content="text/html; charset=utf-8">
>     <title>Minimal AppLaud App</title>
> 	  <script type="text/javascript" charset="utf-8" src="phonegap-1.3.0.js"></script>
> 	  <script type="text/javascript" charset="utf-8">
> 		var status;
> 		var drawStatus = function(info){
> 			var s = "<p><b>Battery Status</b><br/>";
> 			s += "Level is "+info.level + "<br/>";
> 			s += "Plugged in is "+info.isPlugged;
> 			s += "</p>";
> 			status.innerHTML = s;
> 		};
> 				
>       	var battCrit = function(info) {
> 			navigator.notification.alert("Your battery is SUPER low!");
> 			drawStatus(info);
> 		};
>       	var battLow = function(info) {
> 			navigator.notification.alert("Your battery is low!");
> 			drawStatus(info);
> 		};
>       	var battStat = function(info) {
> 			alert('test');
> 			drawStatus(info);
> 		};
> 	  
>         var onDeviceReady = function() {
> 			//listen for battery crit
> 			window.addEventListener("batterycritical", battCrit, false);
> 			window.addEventListener("batterylow", battLow, false);
> 			window.addEventListener("batterystatus", battStat, false);
> 			alert("registered...");
>         };
>         function init() {
>             document.addEventListener("deviceready", onDeviceReady, true);
> 			status = document.getElementById("status");
>         }   
> 	  </script>  
>   </head>
>   <body onload="init();">
>     <h2>Battery Tester</h2>
> 	<div id="status"></div>
>   </body>
> </html>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CB-173) Battery events not working properly on HTC Inspire running 2.2

Posted by "Simon MacDonald (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-173?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Simon MacDonald updated CB-173:
-------------------------------

    Fix Version/s: 1.4.0
         Assignee: Steve Gill

This is actually a packaging problem. The "plugins.xml" file that is packaged up as part of the download from phonegap.com does not included the line for the Battery plugin. I'm assigning it to Steve for the 1.4 release.
                
> Battery events not working properly on HTC Inspire running 2.2
> --------------------------------------------------------------
>
>                 Key: CB-173
>                 URL: https://issues.apache.org/jira/browse/CB-173
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 1.3.0
>         Environment: HTC Inspire, Android 2.2
>            Reporter: Filip Maj
>            Assignee: Steve Gill
>             Fix For: 1.4.0
>
>
> Originally reported by Ray Camden:
> Trying to get a very simple battery status app working. None of my events ever fire. According to the docs, batterystatus should fire when plugging/unplugging a device, but that doesn't trigger it either. Any ideas? HTC Inspire, Android 2.2 SDK. Code below. Note the alert in my battery status callback. I did that in case I screwed up something simple in drawStatus.
> <!DOCTYPE HTML>
> <html>
>   <head>
>     <meta name="viewport" content="width=320; user-scalable=no" />
>     <meta http-equiv="Content-type" content="text/html; charset=utf-8">
>     <title>Minimal AppLaud App</title>
> 	  <script type="text/javascript" charset="utf-8" src="phonegap-1.3.0.js"></script>
> 	  <script type="text/javascript" charset="utf-8">
> 		var status;
> 		var drawStatus = function(info){
> 			var s = "<p><b>Battery Status</b><br/>";
> 			s += "Level is "+info.level + "<br/>";
> 			s += "Plugged in is "+info.isPlugged;
> 			s += "</p>";
> 			status.innerHTML = s;
> 		};
> 				
>       	var battCrit = function(info) {
> 			navigator.notification.alert("Your battery is SUPER low!");
> 			drawStatus(info);
> 		};
>       	var battLow = function(info) {
> 			navigator.notification.alert("Your battery is low!");
> 			drawStatus(info);
> 		};
>       	var battStat = function(info) {
> 			alert('test');
> 			drawStatus(info);
> 		};
> 	  
>         var onDeviceReady = function() {
> 			//listen for battery crit
> 			window.addEventListener("batterycritical", battCrit, false);
> 			window.addEventListener("batterylow", battLow, false);
> 			window.addEventListener("batterystatus", battStat, false);
> 			alert("registered...");
>         };
>         function init() {
>             document.addEventListener("deviceready", onDeviceReady, true);
> 			status = document.getElementById("status");
>         }   
> 	  </script>  
>   </head>
>   <body onload="init();">
>     <h2>Battery Tester</h2>
> 	<div id="status"></div>
>   </body>
> </html>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-173) Battery events not working properly on HTC Inspire running 2.2

Posted by "Joe Bowser (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13203035#comment-13203035 ] 

Joe Bowser commented on CB-173:
-------------------------------

Upped this to 1.5, since it is still broken in 1.4.1
                
> Battery events not working properly on HTC Inspire running 2.2
> --------------------------------------------------------------
>
>                 Key: CB-173
>                 URL: https://issues.apache.org/jira/browse/CB-173
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 1.3.0
>         Environment: HTC Inspire, Android 2.2
>            Reporter: Filip Maj
>            Assignee: Steve Gill
>             Fix For: 1.5.0
>
>
> Originally reported by Ray Camden:
> Trying to get a very simple battery status app working. None of my events ever fire. According to the docs, batterystatus should fire when plugging/unplugging a device, but that doesn't trigger it either. Any ideas? HTC Inspire, Android 2.2 SDK. Code below. Note the alert in my battery status callback. I did that in case I screwed up something simple in drawStatus.
> <!DOCTYPE HTML>
> <html>
>   <head>
>     <meta name="viewport" content="width=320; user-scalable=no" />
>     <meta http-equiv="Content-type" content="text/html; charset=utf-8">
>     <title>Minimal AppLaud App</title>
> 	  <script type="text/javascript" charset="utf-8" src="phonegap-1.3.0.js"></script>
> 	  <script type="text/javascript" charset="utf-8">
> 		var status;
> 		var drawStatus = function(info){
> 			var s = "<p><b>Battery Status</b><br/>";
> 			s += "Level is "+info.level + "<br/>";
> 			s += "Plugged in is "+info.isPlugged;
> 			s += "</p>";
> 			status.innerHTML = s;
> 		};
> 				
>       	var battCrit = function(info) {
> 			navigator.notification.alert("Your battery is SUPER low!");
> 			drawStatus(info);
> 		};
>       	var battLow = function(info) {
> 			navigator.notification.alert("Your battery is low!");
> 			drawStatus(info);
> 		};
>       	var battStat = function(info) {
> 			alert('test');
> 			drawStatus(info);
> 		};
> 	  
>         var onDeviceReady = function() {
> 			//listen for battery crit
> 			window.addEventListener("batterycritical", battCrit, false);
> 			window.addEventListener("batterylow", battLow, false);
> 			window.addEventListener("batterystatus", battStat, false);
> 			alert("registered...");
>         };
>         function init() {
>             document.addEventListener("deviceready", onDeviceReady, true);
> 			status = document.getElementById("status");
>         }   
> 	  </script>  
>   </head>
>   <body onload="init();">
>     <h2>Battery Tester</h2>
> 	<div id="status"></div>
>   </body>
> </html>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (CB-173) Battery events not working properly on HTC Inspire running 2.2

Posted by "Joe Bowser (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-173?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joe Bowser resolved CB-173.
---------------------------

    Resolution: Fixed

Checked this,it's in the current example!
                
> Battery events not working properly on HTC Inspire running 2.2
> --------------------------------------------------------------
>
>                 Key: CB-173
>                 URL: https://issues.apache.org/jira/browse/CB-173
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 1.3.0
>         Environment: HTC Inspire, Android 2.2
>            Reporter: Filip Maj
>            Assignee: Steve Gill
>             Fix For: 1.5.0
>
>
> Originally reported by Ray Camden:
> Trying to get a very simple battery status app working. None of my events ever fire. According to the docs, batterystatus should fire when plugging/unplugging a device, but that doesn't trigger it either. Any ideas? HTC Inspire, Android 2.2 SDK. Code below. Note the alert in my battery status callback. I did that in case I screwed up something simple in drawStatus.
> <!DOCTYPE HTML>
> <html>
>   <head>
>     <meta name="viewport" content="width=320; user-scalable=no" />
>     <meta http-equiv="Content-type" content="text/html; charset=utf-8">
>     <title>Minimal AppLaud App</title>
> 	  <script type="text/javascript" charset="utf-8" src="phonegap-1.3.0.js"></script>
> 	  <script type="text/javascript" charset="utf-8">
> 		var status;
> 		var drawStatus = function(info){
> 			var s = "<p><b>Battery Status</b><br/>";
> 			s += "Level is "+info.level + "<br/>";
> 			s += "Plugged in is "+info.isPlugged;
> 			s += "</p>";
> 			status.innerHTML = s;
> 		};
> 				
>       	var battCrit = function(info) {
> 			navigator.notification.alert("Your battery is SUPER low!");
> 			drawStatus(info);
> 		};
>       	var battLow = function(info) {
> 			navigator.notification.alert("Your battery is low!");
> 			drawStatus(info);
> 		};
>       	var battStat = function(info) {
> 			alert('test');
> 			drawStatus(info);
> 		};
> 	  
>         var onDeviceReady = function() {
> 			//listen for battery crit
> 			window.addEventListener("batterycritical", battCrit, false);
> 			window.addEventListener("batterylow", battLow, false);
> 			window.addEventListener("batterystatus", battStat, false);
> 			alert("registered...");
>         };
>         function init() {
>             document.addEventListener("deviceready", onDeviceReady, true);
> 			status = document.getElementById("status");
>         }   
> 	  </script>  
>   </head>
>   <body onload="init();">
>     <h2>Battery Tester</h2>
> 	<div id="status"></div>
>   </body>
> </html>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-173) Battery events not working properly on HTC Inspire running 2.2

Posted by "Muhammad Siddiq Akbar (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13188330#comment-13188330 ] 

Muhammad Siddiq Akbar commented on CB-173:
------------------------------------------

I got same issues on iPod touch 4g.
None of the batterystatus events are firing. 
Should I report a separate bug?

I am using build.phonegap.com to package it.
I also have added the battery feature in config.xml.
                
> Battery events not working properly on HTC Inspire running 2.2
> --------------------------------------------------------------
>
>                 Key: CB-173
>                 URL: https://issues.apache.org/jira/browse/CB-173
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 1.3.0
>         Environment: HTC Inspire, Android 2.2
>            Reporter: Filip Maj
>            Assignee: Steve Gill
>             Fix For: 1.4.0
>
>
> Originally reported by Ray Camden:
> Trying to get a very simple battery status app working. None of my events ever fire. According to the docs, batterystatus should fire when plugging/unplugging a device, but that doesn't trigger it either. Any ideas? HTC Inspire, Android 2.2 SDK. Code below. Note the alert in my battery status callback. I did that in case I screwed up something simple in drawStatus.
> <!DOCTYPE HTML>
> <html>
>   <head>
>     <meta name="viewport" content="width=320; user-scalable=no" />
>     <meta http-equiv="Content-type" content="text/html; charset=utf-8">
>     <title>Minimal AppLaud App</title>
> 	  <script type="text/javascript" charset="utf-8" src="phonegap-1.3.0.js"></script>
> 	  <script type="text/javascript" charset="utf-8">
> 		var status;
> 		var drawStatus = function(info){
> 			var s = "<p><b>Battery Status</b><br/>";
> 			s += "Level is "+info.level + "<br/>";
> 			s += "Plugged in is "+info.isPlugged;
> 			s += "</p>";
> 			status.innerHTML = s;
> 		};
> 				
>       	var battCrit = function(info) {
> 			navigator.notification.alert("Your battery is SUPER low!");
> 			drawStatus(info);
> 		};
>       	var battLow = function(info) {
> 			navigator.notification.alert("Your battery is low!");
> 			drawStatus(info);
> 		};
>       	var battStat = function(info) {
> 			alert('test');
> 			drawStatus(info);
> 		};
> 	  
>         var onDeviceReady = function() {
> 			//listen for battery crit
> 			window.addEventListener("batterycritical", battCrit, false);
> 			window.addEventListener("batterylow", battLow, false);
> 			window.addEventListener("batterystatus", battStat, false);
> 			alert("registered...");
>         };
>         function init() {
>             document.addEventListener("deviceready", onDeviceReady, true);
> 			status = document.getElementById("status");
>         }   
> 	  </script>  
>   </head>
>   <body onload="init();">
>     <h2>Battery Tester</h2>
> 	<div id="status"></div>
>   </body>
> </html>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira