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:
| Property | Type | Required | Description |
|---|---|---|---|
| success | function | No | Callback function for a successful API call |
| fail | function | No | Callback function for a failed API call |
| complete | function | No | Callback function for API call completion |
Parameters of the success callback function
- Object res: Returns the device battery information
Device battery information properties:
| Property | Type | Description |
|---|---|---|
| level | number | Device battery level, range 1 - 100 |
| isCharging | boolean | Whether the device is charging |
