This API provides a simple way to interact with the brightness of your device.
Brightness.setBrightness(0.7);
...
Brightness.getBrightness().then(val=>console.log(val));
...
Brightness.setKeepScreenOn(true);
window.Brightness.setBrightness(0.7);
...
window.Brightness.getBrightness().then((val) => console.log(val));
...
window.Brightness.setKeepScreenOn(true);
window.Brightness.setBrightness(0.7);
...
window.Brightness.getBrightness().then((val) => console.log(val));
...
window.Brightness.setKeepScreenOn(true);
(<any>window).Brightness.setBrightness(0.7);
...
(<any>window).Brightness.getBrightness().then((val) => console.log(val));
...
(<any>window).Brightness.setKeepScreenOn(true);
window.Brightness.setBrightness(0.7);
...
window.Brightness.getBrightness().then((val) => console.log(val));
...
window.Brightness.setKeepScreenOn(true);
setBrightness(option: float): Promise<any>
Set the device brightness
getBrightness(): Promise<number>
Get the device current brightness
setKeepScreenOn(option: boolean): Promise<any>
Prevents the device from sleeping