1 Replies - 1567 Views - Last Post: 02 December 2012 - 01:08 AM

#1 istore221  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 136
  • Joined: 11-December 11

Blink camera flasher (SOS Message) help

Posted 30 November 2012 - 07:15 AM

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
Is This A Good Question/Topic? 0
  • +

Replies To: Blink camera flasher (SOS Message) help

#2 farrell2k  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 838
  • Posts: 2,573
  • Joined: 29-July 11

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.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1