On Fri, Oct 1, 2010 at 10:22 AM, kevindroid <[email protected]> wrote: > I have written the code to turn screen darker using the following > code: > WindowManager.LayoutParams lp = getWindow().getAttributes(); > lp.screenBrightness = (float) value / 100; > lp.flags |= WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON; > getWindow().setAttributes(lp); > > It only works if the "auto screen brightness" is disabled. > > Hi I have no clue how to disable the "auto screen brightness" in > settings? Please anyone help me.
See SCREEN_BRIGHTNESS_MODE in android.provider.Settings.System. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in Atlanta: http://bignerdranch.com/classes/android -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

