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

Declaring a TV Activity

Android TV uses the Leanback interface, which is designed for big screens controlled by a remote. This UI displays apps and games in a different way from phones. The launcher is also different. Because of this, apps and games need to declare an Activity with a particular intent filter so the Leanback launcher can find them and make them available to the user.

This intent filter will declare the app to be available for launch on a Leanback interface.

The easiest way to proceed is to create a new Activity that extends from our normal activity and then override some methods if necessary to adapt to the TV interface. For now, we will create YassTvActivity that just extends YassActivity:

public class YassTvActivity extends YassActivity ...

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