I made a android project, now my project has a need to set up a alarm type, like blinking screen for which user can see that screen is blinking,
Flashing screen means, screen back light is turn off/on regularly.
Like we make a thread and after every 500 milliseconds we toggle the screen light.
How i do this...
To modify screen brightness, take a look at this question
For repeating schedulded events you can make use of the standard java Timer/TimerTask or simply play with android Handler.postDelayed(Runnable,delay)
For a short introduction to the later, see this question .
Happy coding!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.