Quote from paultomo on September 28, 2025, 1:11 amDoes anyone know how to adjust the screen brightness on an Android Mobile App?
I would like to automatically increase the screen brightness to full when a page containing a barcode is opened, mainly so the user does not have to manually adjust the auto settings when Adaptive Brightness is enabled and the screen is set to dim for the scanner to see the barcode, then it would also need turn the brightness back to it's auto setting again when the page closes.
I've seen many apps that work like this but can't seem to find out how to add this functionality into VisualNeo Web apps.
Thanks
Does anyone know how to adjust the screen brightness on an Android Mobile App?
I would like to automatically increase the screen brightness to full when a page containing a barcode is opened, mainly so the user does not have to manually adjust the auto settings when Adaptive Brightness is enabled and the screen is set to dim for the scanner to see the barcode, then it would also need turn the brightness back to it's auto setting again when the page closes.
I've seen many apps that work like this but can't seem to find out how to add this functionality into VisualNeo Web apps.
Thanks

Quote from luishp on September 28, 2025, 12:13 pm@paultomo
You can try to use a Cordova/VoltBuilder plugin:
Since VisualNEO Web compiles to Cordova for Android apps, you can integrate a Cordova brightness plugin (likecordova-plugin-brightness). That plugin allows:
brightness.set(value)→ set screen brightness (0 to 1)brightness.get()→ read current brightnessbrightness.setKeepScreenOn(true/false)You’d need to:
- Add the plugin to your Cordova/VoltBuilder project.
- Project > Properties > Platform Options > Mobile > Additional config.xml code:
<plugin name="cordova-plugin-brightness" source="npm" />- Use JavaScript to call the plugin methods.
You can try to use a Cordova/VoltBuilder plugin:
Since VisualNEO Web compiles to Cordova for Android apps, you can integrate a Cordova brightness plugin (like cordova-plugin-brightness). That plugin allows:
brightness.set(value) → set screen brightness (0 to 1)brightness.get() → read current brightnessbrightness.setKeepScreenOn(true/false)You’d need to:
Quote from paultomo on September 29, 2025, 10:05 am@luishp
A little more research and this is all working.
You do need to have a paid for account with VoltBuilder to be able to use the Cordova Brightness Plugin.
This is the JavaScript that can be used if anyone else would like to give it a try.
Add this code to page-enter and the same on page-exit but use -1 for setBrightness value. ( -1 is used to reset the brightness to the system default)
BeginJS document.addEventListener("deviceready", onDeviceReady, false); function onDeviceReady() { // Create an alias for the plugin var brightness = cordova.plugins.brightness; // Set the brightness to 100% brightness.setBrightness(1, success, error); function success(result) { console.log("Brightness set successfully: " + result); } function error(err) { console.log("Error setting brightness: " + err); } } EndJSMany Thanks....
A little more research and this is all working.
You do need to have a paid for account with VoltBuilder to be able to use the Cordova Brightness Plugin.
This is the JavaScript that can be used if anyone else would like to give it a try.
Add this code to page-enter and the same on page-exit but use -1 for setBrightness value. ( -1 is used to reset the brightness to the system default)
BeginJS
document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
// Create an alias for the plugin
var brightness = cordova.plugins.brightness;
// Set the brightness to 100%
brightness.setBrightness(1, success, error);
function success(result) {
console.log("Brightness set successfully: " + result);
}
function error(err) {
console.log("Error setting brightness: " + err);
}
}
EndJS
Many Thanks....