I'm attempting to add the ability to use Bluetooth Headsets and Headphones to an application. I've modified the AudioSession like so:
UInt32 audioRouteOverride = kAudioSessionProperty_OverrideCategoryEnableBluetoothInput;
AudioSessionSetProperty (
kAudioSessionProperty_OverrideAudioRoute,
sizeof (audioRouteOverride),
&audioRouteOverride);
UInt32 allowBluetoothInput = 1;
AudioSessionSetProperty (
kAudioSessionProperty_OverrideCategoryEnableBluetoothInput,
sizeof (allowBluetoothInput),
&allowBluetoothInput);
This seems to work fine on the iPhone (tested bluetooth stereo headphones on 3GS iOS4.0.2 and on a 3G 3.1.3) but when I run the same application on iPad (iOS3.2.2) the device speakers play the audio instead of routing it through the headphones. I was able to pair the headphones and hear audio in the iPod application. Going to test on iPod Touch to determine what the situation is on that device but was wondering if anyone knows why this would work on some devices and not others.
EDIT: Also works on 2nd Gen iPod Touch (iOS4.0). Not sure if it matters but since the iPod doesn't have audio input available the Audio Session is set up differently (Playback instead of Playback and Record). I'll be testing with a standard (mono out, microphone) bluetooth headset tomorrow.