# wx.getScreenBrightness(Object object)

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

Gets screen brightness.

# Parameters

# Object object

Attribute Type Default Required Description
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)

# object.success callback function

# Parameters
# Object object
Property Type Description
value number Screen brightness. Range: 0 (Darkest) to 1 (Brightest).

# Note

  • If the auto brightness adjustment feature is enabled in the Android system, the screen brightness will be automatically adjusted according to the light. And this API can only obtain the brightness value before the auto brightness adjustment, instead of the real-time brightness value.