I've had a similar brightness problem some time ago. Take a look at this answer. It should point you in the right direction.
Add this to your activity:
Settings.System.putInt(getContentResolver(),
Settings.System.SCREEN_BRIGHTNESS_MODE, Settings.System.SCREEN_BRIGHTNESS_MODE_MANUAL);
Settings.System.putInt(getContentResolver(), Settings.System.SCREEN_BRIGHTNESS, 255);//255 here is your brightness value, an integer that can be between 0 and 255.
float brightness = 1.0f; //Your desired brightness, float value between 0.0 and 1.0
WindowManager.LayoutParams lp = getWindow().getAttributes();
lp.screenBrightness = brightness;
getWindow().setAttributes(lp);
and add this permission to the AndroidManifest.xml:
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
I've just tested it and this code works on Android 4.1.