Plugin uses Android Log class and not Cordova LOG class
diff --git a/src/android/BatteryListener.java b/src/android/BatteryListener.java
index 740a92e..e519632 100755
--- a/src/android/BatteryListener.java
+++ b/src/android/BatteryListener.java
@@ -20,6 +20,7 @@
import org.apache.cordova.CallbackContext;
import org.apache.cordova.CordovaPlugin;
+import org.apache.cordova.LOG;
import org.apache.cordova.PluginResult;
import org.json.JSONArray;
import org.json.JSONException;
@@ -29,7 +30,6 @@
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
-import android.util.Log;
public class BatteryListener extends CordovaPlugin {
@@ -116,7 +116,7 @@
webView.getContext().unregisterReceiver(this.receiver);
this.receiver = null;
} catch (Exception e) {
- Log.e(LOG_TAG, "Error unregistering battery receiver: " + e.getMessage(), e);
+ LOG.e(LOG_TAG, "Error unregistering battery receiver: " + e.getMessage(), e);
}
}
}
@@ -133,7 +133,7 @@
obj.put("level", batteryIntent.getIntExtra(android.os.BatteryManager.EXTRA_LEVEL, 0));
obj.put("isPlugged", batteryIntent.getIntExtra(android.os.BatteryManager.EXTRA_PLUGGED, -1) > 0 ? true : false);
} catch (JSONException e) {
- Log.e(LOG_TAG, e.getMessage(), e);
+ LOG.e(LOG_TAG, e.getMessage(), e);
}
return obj;
}