ketch.</p>

<h4 id="app-usb-code">Android App USB Code</h4>

<p>In the ADK 2012 Android app, the code for handling USB connections is encapsulated in a
<code>UsbConnection</code> class. This class sets up a <code><a href="../../reference/android/content/BroadcastReceiver.html">BroadcastReceiver</a></code> to
listen for USB events and then attempts to connect when a matching connection event is received.
Here is a summary of the relevant code:</p>

<pre>
import com.android.future.usb.UsbAccessory;
import com