This is not intended to be used by apps.  As you've already said, there is
no SDK API for it.

The supported way for apps to modify the screen brightness is through the
WindowManager.LayoutParams field that sets the screen brightness to be used
while a window is in the foreground.

On Wed, Dec 15, 2010 at 9:23 PM, Hendrik Greving <[email protected]>wrote:

> I noticed that when checking with Settings->Display->Brightness, the
> control bar is set to the setting I am writing with my app. But the display
> doesn't reflect the brightness. Is there any update method or a broadcast I
> have to sent before it gets reflected by the hardware?
>
> ----- Original Message ----- From: "Hendrik Greving" <
> [email protected]>
>
> To: <[email protected]>
> Sent: Wednesday, December 15, 2010 5:04 PM
>
> Subject: Re: [android-developers] display brightness
>
>
>  Ok. I've tried to change the brightness with
>>
>>               Settings.System.putInt(getContentResolver(),
>>                       SCREEN_BRIGHTNESS_MODE,
>>                       SCREEN_BRIGHTNESS_MODE_MANUAL);
>>
>>               Settings.System.putInt(getContentResolver(),
>> Settings.System.SCREEN_BRIGHTNESS, 10);
>>
>> and tried some other values. It doesn't have any effect. Am I missing
>> something? In API level 7, I can't find
>> Settings.System.SCREEN_BRIGHTNESS_MODE so I've defined it myself. Is this a
>> problem?
>>
>> ----- Original Message ----- From: "Mark Murphy" <[email protected]
>> >
>> To: <[email protected]>
>> Sent: Wednesday, December 15, 2010 4:37 PM
>> Subject: Re: [android-developers] display brightness
>>
>>
>>  On Wed, Dec 15, 2010 at 7:26 PM, Hendrik Greving <[email protected]>
>>> wrote:
>>>
>>>> Hi. Is there a way to check if hardware support automatic brightness?
>>>>
>>>
>>> android.provider.Settings.System and SCREEN_BRIGHTNESS_MODE will tell
>>> you if automatic brightness is enabled. I am not aware of a way to
>>> determine if the hardware has the option, though.
>>>
>>>  Can
>>>> setting the system settings to auto throw an exception?
>>>>
>>>
>>> I have no idea what this means, sorry.
>>>
>>> --
>>> Mark Murphy (a Commons Guy)
>>> http://commonsware.com | http://github.com/commonsguy
>>> http://commonsware.com/blog | http://twitter.com/commonsguy
>>>
>>> _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.9
>>> Available!
>>>
>>> --
>>> 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]<android-developers%[email protected]>
>>> For more options, visit this group at
>>> http://groups.google.com/group/android-developers?hl=en
>>>
>>
>>
> --
> 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]<android-developers%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Dianne Hackborn
Android framework engineer
[email protected]

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

-- 
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

Reply via email to