Taking user inputs

There are multiple ways in which you can take inputs from your Android device. Here are a few ways:

  • UI buttons: Buttons drawn on your app's UI
  • Hardware buttons: The keys on your Android device
  • Touch screen inputs: Touches mapped based on the screen coordinates
  • Accelerometer readings: Motion sensor readings

We will be taking a look at each of these input types. So, let's start with the very first type of input, UI buttons.

Get Learning Android Game Development now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.