Lux Auto Brightness fix + deep night mode

by Dennis Murczak

Version 1 (September 18, 2018)

Download (17 downloads)

This fix is meant for devices in which Lux fails to periodically update the screen brightness, even if explicitly set to that mode. What it does is to simply disable Lux' auto mode and tell it in a specified interval to update the brightness using its set profile.

As I developed this flow for a tablet that is primarily used as a desk clock I also incorporated an optional deep night mode. After a specified period of low-light conditions (hackishly determined by reading the system brightness as set by Lux, hence it works without a light sensor) the brightness will be set to -50%; optionally only while charging. Deep night mode can be left by tapping the temporary notification or shaking the device. In addition, alarms and incoming calls automatically end deep night mode.

This flow requires Lux Auto Brightness (the paid version) to be installed on the device.