Skip to main content
Version: v3

setAutoBrightness

Start from API_LEVEL 2.0 . Please refer to API_LEVEL.

Set whether to turn on auto-brightness, if it is on, then the screen brightness will be controlled by the light sensor and the setBrightness will be disabled.

Type

function setAutoBrightness(option: Option): void

Simplified calling method

function setAutoBrightness(autoBright: boolean): void

Parameters

Option

PropertyTypeRequiredDefaultValueDescriptionAPI_LEVEL
autoBrightbooleanY-Whether to open the automatic brightness2.0

Example

import { setAutoBrightness } from '@zos/display'

setAutoBrightness({
autoBright: true,
})