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

Providing a home screen banner


Android TV apps must declare a banner in the manifest. This is another requirement that does not exist for mobile apps.

The banner is used by the Leanback UI to navigate among apps and games. It has a different aspect ratio than the icon. In particular, the banner is an image of 320x180 px that we have to put under the drawable-xhdpi directory.

The banner is a 320x180 px image

This image is as important for TV as the icon is for mobile, it is the entry point to your game on the TV. While we—as developers—can install and run apps on a TV without providing this, there is no easy entry point to launch the app from the Leanback UI without providing the banner.

To define which image is to be used as the banner, we need to add it as one of the attributes of the <appication> tag in the AndroidManifest.xml.

<application
  […]
  android:banner="@drawable/banner_small" >

This attribute was introduced on Lollipop and it is one of the reasons why we need to compile...