Adding screen brightness controls to android application

The internet claims this works, I haven’t tried it though:

WindowManager.LayoutParams lp = getWindow().getAttributes();
lp.screenBrightness = 100 / 100.0f;
getWindow().setAttributes(lp);

Leave a Comment