Skip to main content
Version: 3.x

Taro.getBatteryInfoSync()

The synchronous version of Taro.getBatteryInfo.

Reference

Type

() => Result

Parameters

Result

PropertyTypeDescription
isChargingbooleanIndicates whether the device is charging.
levelstringThe device's battery level. Range: 1-100.

API Support

APIWeChat Mini-ProgramH5React Native
Taro.getBatteryInfoSync✔️