Sample Javascript to access EB.Battery.smartBatteryStatus api

The api for "smartBatteryStatus" is differently used than the "batteryStatus" api.  The sample code only demonstrates how to access the EB.Battery.batteryStatus, but not the smartBatteryStatus.  I need to see a sample on how to use the api so that I can access the battery identification information to create the unique Battery ID (BID).  Any code snippet would be appreciated.

z-JRQ768 (not verified)
Code sample

Hi, the following should work:
EB.Battery.smartBatteryStatus(batteryCallback);
function batteryCallback(params){
if(params){ // Most of these methods have callbacks but null 'params' sent.
console.log(params);
}
else
console.log("No Params");
}
I do not have a device handy to double-check however.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Log in to post comments