# wx.getScreenBrightness(Object object)
Start from base library version 1.2.0. Please remaining backward compatible.
with Promise style call: Supported
Mini Program plugin: Support, need to Mini Program base library version no less than 1.9.6
WeChat Windows edition:: Support
WeChat Mac edition:: Support
Get screen brightness
# parameter
# Object object
attribute | type | Default values | Required | Introductions |
---|---|---|---|---|
success | function | no | Interface calls the successful callback function | |
fail | function | no | Interface calls failed callback functions | |
complete | function | no | Callback function at the end of an interface call (both successful and unsuccessful calls are executed) |
# object.success callback
# parameter
# Object object
attribute | type | Introductions |
---|---|---|
value | number | Screen brightness value, range 0 1,0 Darkest, 1 Brightest |
# Introductions
- If the Android settings enable automatic brightness adjustment, the screen brightness will automatically adjust according to light, the interface can only get the value before the automatic adjustment brightness, not real-time brightness value.