Building games for Android TV

Requires Panda 2 v1.4.0 or later

Building process for Android TV is almost same as for other Android devices, except there are few things to notice.

To build for Android TV, click "Export" button and choose "APK" and then check the "Android TV" option.

Banner

Android TV games and apps require 320x180 banner image. To use your own banner image, place it in your resources folder at icon/android/banner.png

Config

By default, Android TV builds will show up in the games list. If you want to show your project in the apps list, use this in your game.config

game.config = {
    build: {
        isGame: false
    }
};

Remote

Android TV remote will send presses as keyboard events, so you can use the keydown function inside your scene:

game.createScene('Main', {
    keydown: function(key) {
        if (key === 'UP') {
            // Pressed up on remote d-pad
        }
    }
});

Settings

Install after build

You can install builds automatically to Android TV if you turn on Network debugging. After that you need to connect your computer to the Android TV with adb

$ adb connect 192.168.43.79
connected to 192.168.43.79:5555