Skip to main content

setBrightness

Note
Please contact Zalopay Team to be granted permission to use this functionality.

Supported Version

zpa
Started support in Zalopay App from version 8.26.0

Description

Adjust screen brightness

Parameters

ParamData typeRequiredDescription
brightnessnumberYesThe device's brightness. The value is in the range [0, 1]

Return Value

N/A

Error Code

N/A

Sample Code and Sample Return Data

Sample Request:

window.zlpSdk.Device
.setBrightness({ brightness: 0.5 })
.then((response) => console.log(response))
.catch((error) => console.error(error.errorCode));

Sample Response:

{ data: {}, status: "success" }