How Can I Control Contrast & Backlight Programmatically - Java for Android App Development

I need to develop an Android app which should have options to control LED brightness, backlight and contrast. From various documentation on internet, I found ways to control the brightness, but couldn't find anything about backlight and contrast. First of all, in Android devices, isn't brightness and backlight the same? Also, how can I control these two from code? Please let me know your suggestions.

Brightness can be changed by setting the screenBrightness member of the window's LayoutParams (fetched with getAttributes()). It ranges from 0-1, or set to -1 to use the default brightness set by the user in display settings.
However, even at brightness level of 0, the backlight remains on; it's just dim.
I've been looking for a way to turn the backlight off completely, without success. I know it's possible because there is an app called "Screen Backllight OFF" that does it (device must be rooted). I've read various suggestions on using WakeLocks, but I want the device and my app to remain awake and active; all I want to do is temporarily turn off the backlight.
Does anyone know how to turn off the backlight?

Related

Backlight/Screen Brightness - Auto Dim and Auto Off

Has anyone seen an app that dims the backlight before it turns off all the way ?
When I had my 6700, I had discovered that the OS (and I am sure on the Mogul too) was only using some, not all of the power states. I will have to play around with it, but I used one state to leave the display on, without backlight before it went into sleep mode. I also setup the wav device to be on in sleep mode to improve the ring speed.
Will have to poke around to see if you can just dim the screen...
The state that I was playing with was called UserIdle and can be found in HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Power\Timeouts
MSDN has good documentation on the power states...
Geoff
This probably does not give you what you want, however this will dim the screen (although too dim in my opinion - I have not been able to change the brightness)
[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Power\State\UserIdle]
"bkl1:"=dword:00000003
[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Power\State\UserIdle\{EB91C7C9-8BF6-4a2d-9AB8-69724EED97D1}]
@=dword:00000000
[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Power\Timeouts]
"ACUserIdle"=dword:000000B4
"BattUserIdle"=dword:000000B4
Make sure that your display timeout/power timeouts in the control panel are set greater that the ACUserIdle/BattUserIdle otherwise they will occur before the backlight can be put in its dimmest state.
Geoff

Backlight too bright at night

At night the backlight too bright when set to Automatic - it won't go below 30% even when it is totally dark. It seems like this threshold can't be changed. As a workaround, does anyone know if there is a way to make a shortcut to the Backlight settings screen that can be used in Quicklinks, so at least it can be quickly set manually.
try lumos. it works on the hd2

Auto Backlight level

I have noticed that the Automatic control for the backlight on the HD2 works very well. I have never feel like the phone is too dim and only in the darkest rooms do I find it to be a little too bright.
The Auto backlight does not seem to have the ability to get down the the lowest backlight level of the HD2 screen. If I turn off the auto function the screen can get to that "barely on" setting, but on auto the lowest is seems to go is to around 30%, which can be bright in the car at night or reading in bed.
Is there a way to make it so that the automatic backlight control can go all the way to the lowest setting when appropriate?
Have you looked into using 'lumos'? You can find it in the HD2 apps forum section.
I used it before and it should work for you to get the lowest backlight. I stopped using it since I figure 30% is good enough for me in most situations. During my commute, the light sensor gets hit too much and the backlights changes too often so I just turned it off. (I think it may also save me some power as well.)
If I'm reading in the dark I manually set it to 10% and in the morning I set it back to 30%. It's not too often that I will read in the dark so it's not a major issue for me.
I guess along the same lines, is there some app or widget that can be called from the home-screen icons that can control brightness on the fly?
Sense's brightness control is hidden behind far too many presses to make it comfortable to switch quickly. It's a bit annoying when I'm checking my e-mail at work walking under a set of lights, the screen will dim, then brighten, then dim, then... every two steps. Jumping to the menu to change the settings is too cumbersome, something along the lines of two clicks would be much better.
use Lumos
I had the same problem, Lumos works very well in the HD2.

Lowering Brightness

The "low" brightness is way too bright for me. Microsoft is nice enough to introduced 30 levels of volume but offering just 3 levels of brightness is pretty dumb.
Anyways I was looking through registry hack and I found the MinBrightness and MaxBrightness setting. Originally I set it to "manual" and "low" in the brightness setting. Then I checked the registry and the Min and Max is 0 and 19 respectively.
I changed the Max to 0, and it APPEARED to be dimmer than before. I went back to the Setting -> Brightness and now my brightness level is shown as "Medium", Auto adjust set to off. Both of them are grey out so that I cannot change it, I supposed the setting screen read an unsupported combination and freaked out. I wonder if anyone else tried this, or this is just my placebo effect?
I thought I was the only one having this problem.
Hopefully there will a solution regarding this issue.
I wonder if I can use privacy screen to lower the brightness, or even those tinted window screen from home depot.
So where to tweak this in registry?

[Q] Redminote Brightness Lose Control

When I wake up one day,I founded out that the phone screen is very bright,I tried to adjust the brightness but I can't decrease it.In the phone setting the brightness setting is in the minimum but actually brightness is still the Max. I checked the auto brightness setting,it was turned off,I can use other application to adjust the brightness,but once I exit the application,the brightness adjust to the maximum by itself. Please help!!!
Look in the power settings from Security menu
always a Newbie said:
When I wake up one day,I founded out that the phone screen is very bright,I tried to adjust the brightness but I can't decrease it.In the phone setting the brightness setting is in the minimum but actually brightness is still the Max. I checked the auto brightness setting,it was turned off,I can use other application to adjust the brightness,but once I exit the application,the brightness adjust to the maximum by itself. Please help!!!
Click to expand...
Click to collapse
It might be set by the power profile which is currently active, lots of changes will be revert to set value in the power profile.
Let me know if it helps.
Try to update the MIUI
You can try to download and update MIUI and check if the issue still persists.
always a Newbie said:
When I wake up one day,I founded out that the phone screen is very bright,I tried to adjust the brightness but I can't decrease it.In the phone setting the brightness setting is in the minimum but actually brightness is still the Max. I checked the auto brightness setting,it was turned off,I can use other application to adjust the brightness,but once I exit the application,the brightness adjust to the maximum by itself. Please help!!!
Click to expand...
Click to collapse
did you tried installing brightness control app it might work
Still doest work...
i checked my power profile, i didnt set anything at all. And about using apps,i tried several apps but still it cannot adjust my brightness at all. When i use the apps, i can control the brightness, but when i exit the app without closing it (that is by home button), the brightness will auto adjust to the max brightness.

Categories

Resources