Skip to main content
Use this API to get the current screen brightness level.

Parameters

Success Callback Parameters

Code Example

Basic Usage

Display Brightness Percentage

Brightness Adjustment UI

my.setScreenBrightness

Set screen brightness
On Xiaomi phones the reported brightness is not consistent with the actual device brightness, so this API cannot return the correct value on those devices.