Android TV remote control

Photo of Elias Naur
Elias Naur on

In this guest post, Elias Naur walks us through running Tailscale on Android TV.

Running Tailscale on an Android TV device is useful for the situations where you’re trying to connect to a big screen, but can’t use a desktop or mobile device. For example, you might want to access your home media server to watch your favorite TV shows when you’re on the go in a hotel room or Airbnb, and only have an Android TV stick to connect to the provided TV.

The Tailscale Android app now includes support for Android TV, and is available in the Google Play Store for compatible TV devices.

Read on for technical details on how we made this possible.

What took so long?

For most Android apps, supporting Android TV is relatively straightforward: supply a set of metadata and media for the Play Store and test the app on a device (or emulator). However, the user interface of the Tailscale app is built with Gio, that until recently didn’t have the necessary support for TV remote control.

Allowing Gio programs to be navigated with the 4 directional buttons and one activation button of a remote required several additional features:

That was it, except for one more thing: if you reach the end of, say, the list of hosts in your Tailscale network it should scroll as you keep pressing the directional button. So that also means,

Why not use the native UI?

The downside of a from-scratch GUI toolkit is that the usual features from the native interface toolkit have to be implemented, well, from scratch. Fortunately, the Gio community has recently completed support for accessibility, complex text scripts and fonts, right-to-left text layout - all funded by companies such as Tailscale.

Of course, there are several upsides to avoiding the native UI toolkit:

For example, with a recent Go installed on Windows this one command,

$ go run

will bring up a fully functioning GUI window. You can use the same command on the other platforms, with a few additional developer tools installed.

To try out the Tailscale app on your Android TV, download it from the Play Store.

Share via

Subscribe for monthly updates

Product updates, blog posts, company news, and more.

Too much email? RSS Twitter