tags:

views:

825

answers:

4

I have developed code using EAAccessory , and its work fine...

But when i disconnect EAAccessory, my application got exception like an error....I want to show an alert , while disconnecting EAAccessory....

I am using this line of code in my app

  • (void)accessoryDidDisconnect:(EAAccessory *)accessory;

But this event is not fired ..When i disconnect my accessory....

Can anyone help me ?

Thanks in advance..........

A: 

Vonoth, I would like to connect bluetooth printer using ExternalAccessory framework? How did you connect? Can you help me? Can you give me some guide lines on this. Thanks in advance for your help. Can you send some example to my email at [email protected]

Guru

Guru
A: 

Hi, To use accessoryDidDisconnect:, have you correctly implemented the delegate method (EAAccessoryDelegate)?

If you already have some issues, send me your code (I'll give you my @)

Good Luck...

Nick
A: 

Vinoth, can you please post some code sample ? I'm trying to connect via bluetooth with no success and am fully stucked.. any ideas will be highly appreciated )

plug-in
A: 

Hi,

2 get the notification from device when your device gets disconnected, you need to register method with "addObserver" in default notification.

[notificationCenter addObserver: self selector: @selector (accessoryDidConnect:) name: EAAccessoryDidConnectNotification object: nil];

[notificationCenter addObserver: self selector: @selector (accessoryDidDisconnect:) name: EAAccessoryDidDisconnectNotification object: nil];

Deepak