Change the System Brightness Programmatically
07:55 19 Aug 2013

I want to change the system brightness programmatically. For that purpose I am using this code:

WindowManager.LayoutParams lp = window.getAttributes();
lp.screenBrightness = (255);
window.setAttributes(lp);

because I heard that max value is 255.

but it does nothing. Please suggest any thing that can change the brightness. Thanks

java android brightness screen-brightness