changing screen brightness programmatically in android

This is possible to do by using:

WindowManager.LayoutParams layout = getWindow().getAttributes();
layout.screenBrightness = 1F;
getWindow().setAttributes(layout);

See also:
http://developer.android.com/reference/android/view/WindowManager.LayoutParams.html#screenBrightness

Leave a Comment