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
Property | Type | Required | DefaultValue | Description | API_LEVEL |
---|---|---|---|---|---|
autoBright | boolean | Y | - | Whether to open the automatic brightness | 2.0 |
Example
import { setAutoBrightness } from '@zos/display'
setAutoBrightness({
autoBright: true,
})