4

There doesn't seem to be much documented on the flash API and how to alter it when using the camera so I'm hoping someone has already played around with this.

Essentially I want to add camera functionality to my app but remove the double flash (I only need a quick single flash from the LED).

Is this possible?

Edit: I've seen this functionality implemented on the Google Goggles App and Instagram App (not single flash but custom flash controls). Any good resources on how I can replicate their functionality?

bijanv
  • 147
  • 1
  • 1
  • 10

1 Answers1

1

The camera API do not provide any public mean to do this. So short answer is no.

But you have control on the flash API. So you might disable flash in the camera and manually light it up when taking the shot?

I've not done this but I think you have to provide your own control UI for the camera and handle the flash when the shot button is triggered.

Sylvain G.
  • 508
  • 2
  • 9
  • Thanks Sylvain, do you have any good resources on creating custom UI for the camera? I found the ability to control the flash from an app (like how those flashlight apps do it) but I need to incorporate that into a custom camera UI. – bijanv Dec 08 '10 at 04:20
  • This is not something I did but you could have a look to this post: http://blog.blackwhale.at/2009/10/custom-video-overlay-view-on-the-iphone/ – Sylvain G. Dec 08 '10 at 16:44
  • 1
    Thanks I got it working. For those wondering, you need to create a custom overlay, add your own camera buttons (flash button, snap picture button, etc) and use the AVFoundation class along with an NSTimer to play with the flash and get the functionality going. – bijanv Jan 09 '11 at 02:01