Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Audio Session Property Listener auto-deactivated in UIImagePickerController?

I'm developing a camera app to snap photo when the volume button is pressed.

I used AudioSessionAddPropertyListener(kAudioSessionProperty_CurrentHardwareOutputVolume, audioVolumeChangeListenerCallback, self); to successfully get notified when a volume button get pressed before my camera started. However, after I started the camera, this property listener no longer works. Is it get auto deactivated or something?

I have tried to implement a custom UIImagePickerController to include the Audio Session Property Listener inside the ImagePickerController but with no hope. Grateful if anyone can share your view. Thanks.

like image 276
Anthony Avatar asked Oct 13 '22 20:10

Anthony


1 Answers

I'm sorry to say that this is something that is not supported in IOS4. If you managed to implement this successfully the app will get rejected by apple.

However is was announced at WWDC 2011 that this is fully supported in IO5 and will be default behaviour when using UIImagePickerController in any app.

Hope this helps.

like image 93
Tom Kelly Avatar answered Oct 18 '22 01:10

Tom Kelly