Reputation: 21
I am new here and I suspect I am missing something obvious but web searches and reading the apple docs are not helping. I'm stuck so here goes.
I have an iphone 4 running IOS 4.2.10 with a Samsung HM1100 bluetooth headset connected. I am sure it is connected because the iphone general setting say so and the iphone responds when I push the call button on the HM1100. I can't upgrade to IOS 5 and CBCentralManager yet. The HM1100 is supposed to be iphone4 compatible (bluetooth version 2.1+EDR).
My iphone app is importing ExternalAccessory/ExternalAccessory.h
and the code has the following lines
NSArray *accessories = [[EAAccessoryManager sharedAccessoryManager]connectedAccessories];
NSLog( @"acessories %@", accessories);
The code compiles and runs successfully on the iphone attached to the Xcode 4 debugger on a macbook pro and prints out an empty array as follows.
2011-12-27 15:03:25.106 View Switcher[102:307] acessories (
)
I expected it to return at least one EAAccessory
object in the array. I must be doing
something wrong.
thanks, ab
Upvotes: 2
Views: 2393
Reputation: 1494
As Brad Larson pointed out maybe your accessory uses standard bluetooth profiles (like handsfree profile) so it doesn't shows in the list.
Upvotes: 0
Reputation: 14818
EAAccessory
is only for the Made-For-iPod licensed accessories. If it isn't licensed and everything it won't show up in the list. You can't just connect an arbitrary Bluetooth headset or other device.
Upvotes: 3