My application requires following settings in audio session category to work as intended:
AVAudioSessionCategoryPlayback
and kAudioSessionProperty_OverrideCategoryMixWithOthers
=set to true ("Plays audio in background" also set in Info.plist file).
Is there a way to make application with those settigns receive remote control events (from earpiece) and prevent iTunes from kicking in?
I am able to receive remote control events when my application is in the background and kAudioSessionProperty_OverrideCategoryMixWithOthers
is set to false
(default behaviour) but when I fine-tune it to true
, iTunes intercepts remote control events EVEN IF my application is in foreground.
Am I doomed to compromise on either mixable behaviour or remote controls functionality or is there a way around it?