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 books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.