I plan to do background service which will make screen flashing/blinking until user touches screen.
I do not know methods how to make screen flashing – only what learned that could be done with brightness and control via spawned activity.
Want to do flashing with color change on screen i.e. black and white or screen on/off to make it more visible than wih brightness.
From your Service you can interact with the
WakeLock:Acquire the
WakeLockwith:Then to turn the screen on:
Then to turn it off again:
And you could put this into a
Threadwith a sleep or use aTimerto create the flash.For example:
It wouldn’t be black/white, just on/off.
If you wanted to go black/white you would have to also disengage the
KeyLock(Look up the Android Keyguard), and then push anActivitythat was completely Black, then change theActivityto White on aTimeror in aThreadas before. Much more work.Remember to get permission in the
AndroidManifest.xml:Additional permissions will be required for unlocking the
KeyGuardif you go down that route.