0

I have a webview application I want to "keep the screen on".

I thus simply use the most simple "never sleep" code:

getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);

However, it's quite power-consuming, so what I would like to do instead of going to sleep is to reduce brightness to minimum instead of going to sleep, then put the brightness back at its maximum when the user touch the screen anew.

Thank you very much for your help.

  • how about this https://stackoverflow.com/questions/18312609/change-the-system-brightness-programmatically – Thelouras Jan 21 '19 at 08:20
  • Thank you. I should have added that I manage to change the brightness programatically. What I can't seem to do is sort of "override" the sleep sequence. – Mathieu Martin Jan 21 '19 at 08:29

0 Answers0