quddusc | 1dff746 | 2013-07-01 16:57:26 -0700 | [diff] [blame] | 1 | page.title=Supporting Game Controllers |
| 2 | page.tags="game controller" |
| 3 | |
| 4 | trainingnavtop=true |
| 5 | startpage=true |
| 6 | |
| 7 | @jd:body |
| 8 | |
| 9 | <div id="tb-wrapper"> |
| 10 | <div id="tb"> |
| 11 | |
| 12 | <!-- Required platform, tools, add-ons, devices, knowledge, etc. --> |
| 13 | <h2>Dependencies and prerequisites</h2> |
| 14 | <ul> |
| 15 | <li>Android 2.3 (API level 9) or higher.</li> |
| 16 | </ul> |
| 17 | |
| 18 | <h2>You should also read</h2> |
| 19 | <ul> |
| 20 | <li><a |
| 21 | href="http://source.android.com/devices/tech/input/key-layout-files.html" |
| 22 | class="external-link" target="_blank">Key Layout Files</a></li> |
| 23 | <li><a href="{@docRoot}guide/topics/ui/ui-events.html">Input Events</a></li> |
| 24 | </ul> |
| 25 | |
| 26 | <h2>Try it out</h2> |
| 27 | <div class="download-box"> |
| 28 | <a href="http://developer.android.com/shareables/training/ControllerSample.zip" |
| 29 | class="button">Download the sample</a> |
| 30 | <p class="filename">ControllerSample.zip</p> |
| 31 | </div> |
| 32 | |
| 33 | </div> |
| 34 | </div> |
| 35 | |
| 36 | <p>You can greatly enhance the user experience in your game by letting |
| 37 | players use their favorite game controllers. The Android framework provides |
| 38 | APIs for detecting and processing user input from game controllers.</p> |
| 39 | |
| 40 | <p>This class shows how to make your game work consistently with game |
| 41 | controllers across different Android API levels (API level 9 and up), |
| 42 | and how to enhance the gaming experience for players by supporting multiple |
| 43 | controllers simultaneously in your app.</p> |
| 44 | |
| 45 | <h2>Lessons</h2> |
| 46 | |
| 47 | <dl> |
| 48 | <dt><b><a href="controller-input.html">Handling Controller |
| 49 | Actions</a></b></dt> |
| 50 | <dd>Learn how to handle user input from common |
| 51 | input elements on game controllers, including directional pad (D-pad) |
| 52 | buttons, gamepad buttons, and joysticks.</dd> |
| 53 | <dt><b><a href="compatibility.html">Supporting Controllers Across Android |
| 54 | Versions</a></b></dt> |
| 55 | <dd>Learn how to make game controllers behave the same across |
| 56 | devices running different versions of Android.</dd> |
| 57 | <dt><b><a href="multiple-controllers.html">Supporting Multiple Game |
| 58 | Controllers</a></b></dt> |
| 59 | <dd>Learn how to detect and use multiple game controllers that |
| 60 | are simultaneously connected.</dd> |