[jbosstools-issues] [JBoss JIRA] (JBIDE-18556) battery status is not reflected in cordovasim
Ilya Buziuk (JIRA)
issues at jboss.org
Fri Oct 10 10:28:10 EDT 2014
[ https://issues.jboss.org/browse/JBIDE-18556?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13010690#comment-13010690 ]
Ilya Buziuk commented on JBIDE-18556:
-------------------------------------
[~maxandersen] if you add the plugin, update index.js and change battery level you will be able to see logs - !log.png|thumbnail!
{code}
var app = {
initialize: function() {
this.bind();
},
bind: function() {
document.addEventListener('deviceready', this.deviceready, false);
},
deviceready: function() {
// note that this is an event handler so the scope is that of the event
// so we need to call app.report(), and not this.report()
app.report('deviceready');
window.addEventListener("batterystatus", onBatteryStatus, false);
function onBatteryStatus(info) {
// Handle the online event
console.log("Level: " + info.level + " isPlugged: " + info.isPlugged);
}
},
report: function(id) {
console.log("report:" + id);
// hide the .pending <p> and show the .complete <p>
document.querySelector('#' + id + ' .pending').className += ' hide';
var completeElem = document.querySelector('#' + id + ' .complete');
completeElem.className = completeElem.className.split('hide').join('');
}
};
{code}
> battery status is not reflected in cordovasim
> ---------------------------------------------
>
> Key: JBIDE-18556
> URL: https://issues.jboss.org/browse/JBIDE-18556
> Project: Tools (JBoss Tools)
> Issue Type: Bug
> Components: aerogear-hybrid, browsersim
> Reporter: Max Rydahl Andersen
> Attachments: log.png
>
>
> create basic cordova app.
> run in cordova sim.
> changing the battery level and is-plugged does not take effect in the simulator.
> Should it not be able to detect these ?
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
More information about the jbosstools-issues
mailing list