Port.N.Battery

If possible, retrieve the current battery level of the connected device. See notes about battery information collection. Depending on the device type (Androidâ„¢, iOS etc.) and the host OS, different data may be returned.

For Apple, "Apple Mobile Device Support" must be installed (included with iTunes)

For Android, adb must be installed and running.

Syntax: see Call Structure

{

"method": "cbrx_connection_get",

"params": [

connection-handle

"Port.N.Battery"

]

}

connection-handle is the Connection Handles as an integer.

Returns:

{

"result": {

"CurrentLevel":battery-current-level,

"CurrentTime":current-hub-time,

"StartingLevel":charge-start-level,

"StartingTime":charge-start-time,

}

}

Output Description
battery-current-level Current battery level of device displayed as a percentage
current-hub-time The hub time, shown as an integer in ms
charge-start-level Battery percentage level when device connected
charge-start-time The hub time charging started, shown as an integer in ms
Example
Copy
{
    "jsonrpc": "2.0",
    "id": 0,
    "result": {
    "CurrentLevel": 78,
    "CurrentTime": 15234254346,
    "StartLevel": 23,
    "StartTime": 15124151512,
    }
}