Skip to main content
Version: v3

hmSetting.setScreenAutoBright(isAutoBright)

Set whether auto-brightness is enabled or not.

If auto-brightness is currently turned on and the brightness is automatically adjusted by the light sensor, the setBrightness function will have no real effect.

Type

(isAutoBright: boolean) => result

Parameters

isAutoBright

DescriptionRequiredTypeDefault
Whether to open the automatic brightnessYESboolean-

result

DescriptionType
result, 0 means the setting is successfulnumber

Code example

const result = hmSetting.setScreenAutoBright(true)