Book Image

Mastering Android Game Development

By : Raul Portales
Book Image

Mastering Android Game Development

By: Raul Portales

Overview of this book

Table of Contents (18 chapters)
Mastering Android Game Development
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
API Levels for Android Versions
Index

Declaring it as a game


As you can see in the previous screenshot, the Leanback UI separates apps from games, and our game is listed among the apps. We are building a game and we want to be classified as such.

This is another property of the <application> tag that was also introduced in Lollipop for Android TV; we can declare the app to be a game.

<application
  […]
  android:isGame="true">

This will show the banner in the Games category.

YASS listed in the Games category on an ADT-1

Declaring Leanback support

To allow Google Play to list our game when searching from an Android TV, we need to specifically declare that we support the Leanback UI. To do that, we have to declare that we use the Leanback feature:

<uses-feature android:name="android.software.leanback"
  android:required="false" />

Note that we declare that we use it but we mark it as not required. This is important because otherwise the game will not appear for devices that do not have the Leanback feature. If we were...