Skip to content

sud.getBatteryInfo ​

JS
    sud.getBatteryInfo(Object object)

Get the device battery information

Parameters

  • Object object: Input parameters, see the properties in the table below

object properties:

PropertyTypeRequiredDescription
successfunctionNoCallback function for a successful API call
failfunctionNoCallback function for a failed API call
completefunctionNoCallback function for API call completion

Parameters of the success callback function

  • Object res: Returns the device battery information

Device battery information properties:

PropertyTypeDescription
levelnumberDevice battery level, range 1 - 100
isChargingbooleanWhether the device is charging