In my application, under certain activity must keep the screen always active (classic keepScreenOn).
In order to reduce a little battery consumption, I would like to implement an energy saving system (similar to the default) type:
After 10 seconds of inactivity, the brightness goes to a minimum (without ever sending the activity paused or similar) to tap the brightness returns to normal and so on ...
is possible to implement such a system? there is an automatic way to calculate the idle time? (because otherwise I would create a cooldwon from 10 to 0, to be carried forward to 10 to each user's tap ...)
Thank you very much
I think this is possible using WindowManager.LayoutParams:
The value ranged from 0 (dark) to 1 (bright). A value below 0 resets the default android value.