Android has supported a wide array of game controllers since API level 9
(Android 2.3 Gingerbread). Modern Android versions accommodate many popular
gamepads and their advanced functionalities such as:

- Classic and advanced inputs
- Local multiplayer with multiple gamepad support
- Touchpad support
- Haptics
- Lightbar control
- Accelerometer

To facilitate the most common use cases today, Android has a [standard
definition for gamepad mappings](https://developer.android.com/games/sdk/game-controller/controller-input#process-inputs) to simplify the amount of testing a
developer has to perform while also preserving what makes each type of gamepad
unique.

Your game engine may already support controller input for Android today, and we
recommend starting there as you look to implement controller support in your
game. If your game engine doesn't support controller input, or only supports
basic features and you would like to take advantage of advanced features, you
can use the following libraries to implement support directly into your game
with our Android APIs:

- For C++ developers using [NativeActivity](https://developer.android.com/ndk/reference/group/native-activity) or [GameActivity](https://developer.android.com/games/agdk/game-activity), it is recommended to use the [Game Controller
  Library](https://developer.android.com/games/sdk/game-controller). This library, a component of the [Android Game Developer's
  Toolkit](https://developer.android.com/games/agdk/overview), offers a C/C++ API comparable to other platforms. It also provides straightforward access to haptics and advanced motion events, along with a mechanism for detecting gamepad layouts and labels, enabling games to display accurate button prompts.
- For Java and Kotlin developers using the native Android APIs, this guide describes how to [handle controller actions](https://developer.android.com/games/sdk/game-controller/controller-input) across the most common game controllers, [support multiple game controllers](https://developer.android.com/games/sdk/game-controller/multiple-controllers) to enable local "couch" multiplayer, and enable [advanced controller features](https://developer.android.com/games/sdk/game-controller/controller-features) such as haptics, touchpads, and inertial measurement units (gyroscopes and accelerometers).

Regardless of how you implement controller support for your game, we recommend
following our [testing guidance](https://developer.android.com/games/sdk/game-controller/testing_controller) to ensure a consistent and high-quality
experience for your users across Android devices. We also recommend reviewing
[how controller-supported games are displayed in the Google Play Store](https://developer.android.com/games/sdk/game-controller/visibility),
which includes instructions on how to make sure your game is correctly labeled
as having controller support.

## Multi-form factor

Android's broad compatibility with diverse device form factors extends to game
controllers, allowing you to elevate your gaming experience whether you're
playing on a mobile phone, a large screen tablet or even through a TV. Large
screens and Android TV devices are perfect for a console-like experience in the
comfort of your living room, offering rich visuals and the ability to play more
graphically intensive games. This cross-device compatibility not only enhances
gameplay but also broadens your choices, ensuring that the best gaming
experiences are accessible on any Android-powered device.

For more information, see the following related resources:

- [Google Play Games on PC](https://developer.android.com/games/playgames/input)
- [Large screen](https://developer.android.com/guide/topics/large-screens/input-compatibility-large-screens#game_controllers)
- [TV](https://developer.android.com/training/tv/games#gamepad)