i'm developing a Torch app..i have 3 buttons
1 --> Torch
2 ----> Screen torch
3 ---> SOS Message (blink camera flasher on and off contentiously)
all above 1 and 2 steps are working ..but i have no idea how to get done 3 rd one..can anyone give me a sample code how to do this..thanks
Blink camera flasher (SOS Message) help
Page 1 of 11 Replies - 3742 Views - Last Post: 02 December 2012 - 01:08 AM
Replies To: Blink camera flasher (SOS Message) help
#2
Re: Blink camera flasher (SOS Message) help
Posted 02 December 2012 - 01:08 AM
You already have all the code you need to do it. Just think about how it would work. You turn the camera on, then off, then on, then off, then on, then off. Spawn a new Thread or a new Task with a TimerTask that turns the flash feature off, then sleeps for x time, then turns it on, etc. You could even use a CountDownTimer, but then have to do it all in the UI(main) thread.
Page 1 of 1