0

I want to read the bluetooth headset name.

I managed to rout the sound trough the headset and to get the current route for the kAudioSessionProperty_AudioRoute.

I was not able to find any documentation how to read the headset name. Any link, advice or code is welcome.

Alex Terente
  • 12,006
  • 5
  • 51
  • 71

1 Answers1

0

You can't read the name of the device as it is written in Settings/Bluetooth. However, you can access to the name written in the device (which sometimes is different, I've seen this case) :

EASessionController = [EADSessionController sharedController];
    _accessoryList = [[NSMutableArray alloc] initWithArray:[[EAAccessoryManager sharedAccessoryManager] connectedAccessories]];

    for (EAAccessory *key in _accessoryList)
    {
            NSLog(@"Name : %@", key.name);
    }

More information at EAAccessory class.

Larme
  • 24,190
  • 6
  • 51
  • 81
  • This will read Bluetooth headsets? Because i have tried it and it does not seem to work. And my Bluetooth is recognized by other apps. I have also read that the EAAccessoryManager will return only the made for iPod deviceces – Alex Terente Nov 12 '12 at 16:22
  • Yes, it works for headsets (I've done it with headset and a few toys), but only with Made for iPhone/iPod devices. – Larme Nov 12 '12 at 17:58