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.

️GoNative JavaScript Bridge

To set brightness from 0 to 100% call with 0 to 1.0, e.g. 0.8 for 80% brightness:

gonative.screen.setBrightness({'brightness':'0.8'})';

To configure so that brightness reverts to the previous setting after the page is navigated:

gonative.screen.setBrightness({'brightness':'0.8', 'restoreOnNavigation': true});

To set default brightness:

gonative.screen.setBrightness({'brightness':'default'})';