dlt.setScreenBrightness
Introduction
The dlt.setScreenBrightness
function is used to set the screen brightness of the device.
Parameters
Object object
Property | Type | Default Value | Required | Description |
---|---|---|---|---|
screenBrightness | number | Yes | The screen brightness to set. | |
success | function | No | Callback function for a successful API call. | |
fail | function | No | Callback function for a failed API call. | |
complete | function | No | Callback function that is called when the API call is complete (whether successful or not). |
The screenBrightness
property can take values from 0 to 1, with 0 representing the lowest brightness and 1 representing the highest brightness. You can also use the special value -1 to indicate that the brightness should follow the system's automatic setting.
Example Code
dlt.setScreenBrightness({
screenBrightness: 1,
});
In this example, the screen brightness is set to the maximum value (1).