0

I have a special requirement with my Android tab (SM-T825) in which I need to programmatically turn on or off the display backlight but still be able to receive touch inputs. I tried various options as seen in multiple SO posts but none of them really works. I had the following code:

ContentResolver cResolver = getApplicationContext().getContentResolver();
Settings.System.putInt(cResolver, Settings.System.SCREEN_BRIGHTNESS, 0);

which only dims the screen, but not really turning it off. Is this really possible even on a rooted phone or with a custom ROM?

Babu James
  • 2,740
  • 4
  • 33
  • 50

1 Answers1

0

I found the answer for this issue. I have to root the phone and write 0 to /sys/class/backlight/panel/brightness as root

Babu James
  • 2,740
  • 4
  • 33
  • 50