I have an android application that will dim the screen due to inactivity. This is typically after 15 seconds. Any touch brings the screen to full brightness.
When the screen dims I want to perform some actions on screen.
It seems there is no intent to capture screen dim.
My plan is to create a service that runs in the background. This service will find the dim due to inactivity timeout (15s) and start a runnable. Once the runnable executes it will perform my actions screen.
The service will also need to detect any touch from any screen to immediately go back.
Is there a simpler way to do this? Think of my screen action as turning on a screen saver. A screen saver that must be active only when the screen has dimmed due to inactivity.
It looks like I could have used the PowerManager in Android to check if the device is in idle mode. However my version of Android is so old this has not been implemented.