I'm trying to get the list of paired Bluetooth headset devices on my iPhone. I tried the External Accessory Framework as below:
[[EAAccessoryManager sharedAccessoryManager] registerForLocalNotifications];
NSArray *accessories = [[EAAccessoryManager sharedAccessoryManager] connectedAccessories];
but accessories array is always empty. Did I miss something? what is the right way of getting the list of attached Bluetooth headsets?
Assuming I could get the list of Bluetooth headsets, is there a way to redirect audio output to a certain Bluetooth headset?
according to the code below, there is no way to pick which device to send audio to:
UInt32 allowBluetoothInput = 1;
AudioSessionSetProperty(kAudioSessionProperty_OverrideCategoryEnableBluetoothInput,
sizeof (allowBluetoothInput), &allowBluetoothInput);
Thanks for your help,
Mehrdad
PS: I also tried Apple's sample app which practices External Accessory Framework, no luck!