From 9bd29c0afa04568c9b79b9dcc367674dce1315ce Mon Sep 17 00:00:00 2001 From: jcesarmobile Date: Fri, 13 Mar 2020 14:41:21 +0100 Subject: [PATCH] docs(Device): fix getInfo response and add getBatteryInfo example --- site/docs-md/apis/device/index.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/site/docs-md/apis/device/index.md b/site/docs-md/apis/device/index.md index e092de0bec..54e3b2b3d6 100644 --- a/site/docs-md/apis/device/index.md +++ b/site/docs-md/apis/device/index.md @@ -35,13 +35,21 @@ console.log(info); "osVersion": "11.2", "platform": "ios", "memUsed": 93851648, - "battery": -1, "diskTotal": 499054952448, "model": "iPhone", "manufacturer": "Apple", "uuid": "84AE7AA1-7000-4696-8A74-4FD588A4A5C7", "isVirtual":true } + +const info = await Device.getBatteryInfo(); +console.log(info); + +// Example output: +{ + "batteryLevel": -1, + "isCharging": true +} ``` ## API