Game Controller Library   Part of Android Game Development Kit.

The Game Controller library, also known as Paddleboat, helps you implement robust support for game controllers. The Game Controller library is distributed as a Jetpack library for games using a Gradle-based build system (including Android Studio). The library provides the following:

  • Callbacks for detecting controller connections and disconnections
  • Controller device information, including button style and layout
  • Controller input data, standardized around modern dual-stick controller designs
  • Extended features on supported controllers, including vibration, lights, motion axis data, and battery status
  • Ability to read input from virtual and physical mouse devices
  • Ability to specify custom controller mapping data for particular devices

Compatibility requirements

The Game Controller library has minimum compatibility requirements of:

  • Android 4.4 (API level 19) or higher
  • Android NDK version 21 or higher

Integrate

The Jetpack Android Games page has integration instructions to add the Game Controller library dependency to your game's build.gradle file.

The Jetpack library release of Game Controller is a static library built against the C++ runtime shared library.

After updating your build.gradle file, you will need to add the following line to your game's main CMakeLists.txt file:

find_package(games-controller REQUIRED CONFIG)

You will also need to add the following entry to the list of libraries in the target_link_libraries command of your game's main shared library:

games-controller::paddleboat_static

For a sample that integrates the Game Controller library, see the games-samples repository.

Next steps

See the following guides to continue integrating the Game Controller library into your game: