# wx.setKeepScreenOn(Object object)

Start from base library version 1.4.0. Please remaining backward compatible.

Sets whether to keep the screen always bright. This setting only works in the current Mini Program.

# Parameters

# Object object

Attribute Type Default Required Description
keepScreenOn boolean Yes Indicates whether to keep the screen always bright
success function No The callback function for a successful API call
fail function No Callback function for failed API call
complete function No Callback function used when API call completed (always executed whether call succeeds or fails)

# Sample Code

wx.setKeepScreenOn({
  keepScreenOn: true
})