xref: /aosp_15_r20/development/samples/USB/MissileLauncher/_index.html (revision 90c8c64db3049935a07c6143d7fd006e26f8ecca)
1*90c8c64dSAndroid Build Coastguard Worker<p>MissileLauncher is a simple program that controls Dream Cheeky USB missile launchers.
2*90c8c64dSAndroid Build Coastguard WorkerYou control the left/right/up/down orientation of the launcher using the accelerometer.
3*90c8c64dSAndroid Build Coastguard WorkerTilt the tablet to change the direction of the launcher. Pressing the <strong>Fire</strong> button will fire one missile.</p>
4*90c8c64dSAndroid Build Coastguard Worker
5*90c8c64dSAndroid Build Coastguard Worker<p>This program serves as an example of the following USB host features:</p>
6*90c8c64dSAndroid Build Coastguard Worker<ul>
7*90c8c64dSAndroid Build Coastguard Worker<li>filtering for multiple devices based on vendor and product IDs (see <code>device_filter.xml</code>)</li>
8*90c8c64dSAndroid Build Coastguard Worker<li>Sending control requests on endpoint zero that contain data</li>
9*90c8c64dSAndroid Build Coastguard Worker<li>Receiving packets on an interrupt endpoint using a thread that calls
10*90c8c64dSAndroid Build Coastguard Worker  {@link android.hardware.usb.UsbRequest#queue queue()} and {@link android.hardware.usb.UsbDeviceConnection#requestWait requestWait()}.</li>
11*90c8c64dSAndroid Build Coastguard Worker</p>