O'Reilly logo

Mastering Android Game Development by Raul Portales

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Showing controller instructions

One of the special requirements for an app to be approved for Android TV is to provide a dialog indicating how the controller is mapped. For this Google provides us with a template that we can use and it is available online: (http://developer.android.com/training/tv/games/index.html).

Showing controller instructions

Template for controller mapping

We already have a dialog that is displayed when a controller is connected, but we never updated it from being just an AlertDialog. It is time we made it a custom dialog.

The logic for phones was to show the dialog only the first time the main menu was loaded and a controller was connected. For Android TV, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required