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.