getAutoBrightness
Start from API_LEVEL
2.0
. Please refer to API_LEVEL.
Get whether to turn on the screen auto brightness setting.
Type
function getAutoBrightness(): Result
Parameters
Result
Type | Description |
---|---|
boolean | true - auto-brightness is set to on, false - auto-brightness is set to off |
Example
import { getAutoBrightness } from '@zos/display'
const result = getAutoBrightness()
if (result) {
console.log('Auto brightness setting is turned on')
}