Announcement: Tencent Cloud Mini Program Platform Renamed to Tencent Cloud Super App as a Service on January 2, 2025
Console Updates
Android SDK Updates
iOS SDK Updates
Flutter SDK Updates
IDE Updates
Base Library Updates
The utilization method for this API is Object wx.getBatteryInfoSync().
Attributes | Types | Note |
level | number | Device battery level, ranging from 1 - 100. |
isCharging | boolean | Is the device currently charging? |
The method for utilizing this API is wx.getBatteryInfo(Object object).
Attributes | Types | Default value | Required | Note |
success | function | - | Not required | Callback function for successful interface invocation |
fail | function | - | Not required | Callback function for unsuccessful interface invocation |
complete | function | - | Not required | Callback function executed upon the completion of the interface invocation (both successful and unsuccessful invocations) |
Attributes | Types | Note |
level | number | Device battery level, ranging from 1 - 100. |
isCharging | boolean | Is the device currently charging? |
Was this page helpful?
You can also Contact sales or Submit a Ticket for help.
Help us improve! Rate your documentation experience in 5 mins.
Feedback