Remove All Ads from XDA

How Can I Control Contrast & Backlight Programmatically

139 posts
Thanks Meter: 22
By unni_kmr, Senior Member on 20th March 2014, 03:18 AM
Post Reply Email Thread
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.
21st February 2016, 09:18 PM |#2  
Junior Member
Thanks Meter: 0
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?
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes