From 057512a734144213460dbd872ea602ad46cc95c5 Mon Sep 17 00:00:00 2001 From: jcesarmobile Date: Fri, 13 Mar 2020 15:09:32 +0100 Subject: [PATCH] docs(Device): fix getInfo response and add getBatteryInfo example (#2569) --- 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