Skip to content

Android controller implementation

Benjamin Schulte edited this page Dec 20, 2020 · 5 revisions
ℹ️ Note Removed from the repo with v2.3.0 and up, all features are included in gdx-controllers v2, usable with gdx 1.9.11+. If you still need to use an older gdx version, refer to v2.2.1

This is very similar to the libGDX' official Android controllers implementation, however, there are some minor additions:

  • Fix for Crash on FireTVs (from PR 5657)
  • Configuration for getting all controller button events (from PR 5702)
  • Implements Advanced controller interface and supports vibration (since v0.4.0)

You can use it by just changing the following lines in your build.gradle's Android project:

    compile "com.badlogicgames.gdx:gdx-controllers-android:$gdxVersion"

to:

    compile "de.golfgl.gdxcontrollerutils:gdx-controllers-android:$cuversion"

Attention

  • Use cuversion 1.0.1 for libGDX versions 1.9.10 or lower
  • Use cuversion 2.0.0 or higher for libGDX version 1.9.11 and newer