Skip to main content
Version: v1.0

hmSetting.getScreenAutoBright()

Returns whether the current device has auto-brightness enabled.

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

() => result

Return value

result

DescriptionType
Returns whether auto-brightness is enabled for the current device, true is enabledboolean

Code example

const isAutoBright = hmSetting.getScreenAutoBright()