getBrightness
Start from API_LEVEL
2.0
. Please refer to API_LEVEL.
Get the screen brightness of the current device.
Type
function getBrightness(): Result
Parameters
Result
Type | Description |
---|---|
number | Screen brightness value, range 0 - 100 |
Example
import { getBrightness } from '@zos/display'
const result = getBrightness()
console.log(`current brightness ${result}`)