Tools - Screen Brightness

WindowManager.LayoutParams layout = getWindow().getAttributes();

layout.screenBrightness = 0.5F ; getWindow().setAttributes(layout);

// 0.5 is %50
// 1 is %100