0 Replies Latest reply on Oct 17, 2017 11:58 AM by martinr82627281

    Check the current battery status if it is plugged in or not


      I want to check if the device is plugged in or not with this plugin:




      document.addEventListener("deviceready", onDeviceReady, false);

      function onDeviceReady() {


      navigator.getBattery().then(function(battery) {
      .log("result: " + battery.charging);




      But the result is always TRUE, even if I unplug it.

      What could be the reason?