I have several questions to the CoreAudio AudioSession framework related to several Bluetooth tasks and I hope someone can help me with these issues or at least can confirm my latest findings. The usecase is a navigation app that wants to connect with a bluetooth enabled radio which supports both, HFP and A2DP. I have read the whole AudioSession Programming Guidelines but I have still some open issues especially using audio output through Bluetooth.
Bluetooth HFP audio output (kAudioSessionOutputRoute_BluetoothHFP) is only possible in case of AudioSession kAudioSessionCategory_PlayAndRecord is set and you are overriding the following property: kAudioSessionProperty_OverrideCategoryEnableBluetoothInput. Is this true? If not, how I can route as an example with the MediaPlayback session to kAudioSessionOutputRoute_BluetoothHFP route.
Audio output in background mode is not possible with the category kAudioSessionCategory_PlayAndRecord. Therefore I can not play sound through an bluetooth HFP route if I am in background. Is this true? Is there a way how to send audio through the Bluetooth HFP protocol if app is in the background?
If there is an A2DP enabled device available my audio route will always switch automatically to the kAudioSessionOutputRoute_BluetoothA2DP route. How can I prevent this route change? In addition how can I specify the output route I wanna have at the moment. With iOS5 it is possible to query all those route destination through the kAudioSessionProperty_AudioRouteDescription flag, but I have no idea how I can set it as I wanna have it. Is it somehow possible to achieve this?
I hope some of you can help me with these questions. It would really help me with my overall understanding of the CoreAudio, especially the AudioSession framework.