Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get list of paired Bluetooth headsets on iPhone?

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!

like image 354
Mehrdad M Avatar asked Dec 02 '25 03:12

Mehrdad M


1 Answers

Did you ever resolve this? I'm new to the External Accessory Framework, but from what I've found this framework only supports MFi compliant devices: http://developer.apple.com/library/ios/#qa/qa1657/_index.html

like image 70
mkr707 Avatar answered Dec 03 '25 17:12

mkr707



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!