Screen Brightness
This feature allows you to dynamically set the device screen brightness at runtime. This feature can be used to dim the screen for reading apps, or to brighten the screen to show a QR code for scanning such as a bus pass or hotel booking app.
↔️Median JavaScript Bridge
To set brightness from 0 to 100% call with 0 to 1.0, e.g. 0.8 for 80% brightness:
median.screen.setBrightness({'brightness':'0.8'})';
To configure so that brightness reverts to the previous setting after the page is navigated:
median.screen.setBrightness({'brightness':'0.8', 'restoreOnNavigation': true});
To set default brightness:
median.screen.setBrightness({'brightness':'default'})';
Updated 9 months ago