There are apparently at least three different techniques for changing screen brightness in the Android OS. Two of them no longer work post-cupcake and the third accepted technique evidently has a bug.
I would like to increase screen brightness at the start of a one-view activity then turn the brightness back to the user setting at the end of the activity. No buttons, no second view or second activity. Just a maxed brightness at start and a return to original brightness setting at the end of the activity.
The examples of the current technique using WindowManager.LayoutParams that I have located range from 2 lines of code
WindowManager.LayoutParams lp = getWindow().getAttributes();
lp.screenBrightness = 100 / 100.0f;
getWindow().setAttributes(lp);
to several pages of source code and numerous activities.
Is there a simple example of maxing the screen brightness at start that someone can provide a link to?
Thank you for reading my question.