views:

468

answers:

1

In my iPhone app, I am using the UIImagePickerController with source type UIImagePickerControllerSourceTypeCamera. When the user takes a picture, the phone plays the familiar camera shutter sound. How can I replace this with my own custom sound? I know it's possible because I've seen other apps from the App Store do it (e.g. Red Laser).

A: 

I am quite certain it's not possible. AFAIK, Red Laser doesn't actually take a "normal" picture but uses UIGetScreenImage() (undocumented but nevertheless allowed for App Store apps) to make a screenshot of the live video feed. Since the OS does not play sound on this occasion, they are free to play their own sound.

Edit for clarification: As of OS 3.1, you are free to substitute the standard camera interface with your own controls. So you could place your own shutter button on the screen and play your own sound when the user taps it, but AFAIK there is now way to get rid of the OS's standard shutter sound.

Ole Begemann
Thanks for that. Is there a way to at least disable the sound?
Suresh
No, because this shouldn't be a per-app setting. The user is free to silence their device if they don't want the shutter sound (unless the live in Japan where the shutter sounds even if the ringer is set to silent, I heard). From the user's perspective, this makes perfect sense IMO.
Ole Begemann
Sigh, alright, thanks for that!
Suresh