wx.setScreenBrightness(OBJECT)
Set screen brightness.
OBJECT parameter description:
parameter | Types of | Required | illustrate |
---|---|---|---|
value | Number | Yes | Screen brightness value, the range is 0~1, 0 is the darkest, 1 is the brightest |
success | Function | no | The interface call is successful |
fail | Function | no | Callback function for interface call failure |
complete | Function | no | The callback function of the end of the interface call (the call will be executed if it succeeds or fails) |
// keep the screen always on wx.setKeepScreenOn({ keepScreenOn: true })
// Set the screen brightness to the darkest wx.setScreenBrightness({ value: 0 })