yarbelk
yarbelk

Reputation: 7725

When is android.hardware.usb.action.USB_ACCESSORY_ATTACHED issued?

Is the broadcast android.hardware.usb.action.USB_ACCESSORY_ATTACHED issued when the device is connected, or when the Host opens the endpoint?

Upvotes: 0

Views: 461

Answers (1)

AndroidNewbie
AndroidNewbie

Reputation: 515

I believe it depends upon how you look at it. The host has to open the endpoint to do the little "AOA Protocol Dance" with the Android device to know that it can support Accessory Mode at all. In other words, some data has to be exchanged before Android knows to send you that Intent. But affer you get that Intent, you use openAccessory to actually associate with the endpoint(s) your code uses. So the answer depends on "which" endpoints you are talking about. Hope this helps!

Upvotes: 1

Related Questions