All articles

Technical

Deploying Trusted Web Activities to Android TV and Google TV

October 6, 2026 · 9 min read

As web applications become increasingly powerful, developers are looking to expand their reach beyond mobile devices and onto large screens. Deploying a Progressive Web App to Android TV and Google TV using a Trusted Web Activity is a highly efficient way to bring media hubs, dashboard displays, and web-based games to the living room. However, TV hardware introduces specific input paradigms, design layouts, and manifest declarations that differ from standard mobile setups.

By understanding how to adjust your Trusted Web Activity configuration and optimise your web code for 10-foot interfaces, you can successfully publish your web application on the Google Play Store for Android TV devices.

Why Use Trusted Web Activities for Android TV?

Traditional WebView containers often suffer from poor rendering performance, lack of access to shared browser state, and compatibility issues with modern JavaScript APIs. Because a Trusted Web Activity runs on top of the system's underlying Chrome browser engine, your web application runs with full performance optimisations, standard hardware acceleration, and complete modern API support on TV hardware.

This allows you to maintain a single codebase for your web application, mobile app, and TV platform, deploying real-time updates directly to your web server without requiring constant application package updates through the Google Play Console.

Configuring the Android Manifest for Android TV

To make your Trusted Web Activity package compatible with Android TV, you must make specific declarations within your Android project. The Google Play Store uses these declarations to filter out apps that are not explicitly designed to work with TV hardware.

1. Declaring Leanback Support

Android TV devices do not use standard touch screen inputs. Your app must declare that it does not require a touchscreen interface and that it supports the Leanback user interface layout. This is accomplished by adding the following elements to your build configuration:

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

<uses-feature android:name="android.hardware.touchscreen" android:required="false" />

Setting these features to false prevents Google Play from excluding your application from mobile and tablet devices, allowing you to ship a single unified binary containing both mobile and TV target categories.

2. Registering the TV Launcher Activity

A standard mobile app launcher icon is not displayed on the Android TV home screen. You must define a TV launcher intent filter inside your main activity block, prompting the system to list your application within the Leanback launcher dashboard:

<intent-filter>
  <action android:name="android.intent.action.MAIN" />
  <category android:name="android.intent.category.LEANBACK_LAUNCHER" />
</intent-filter>

You must also supply a TV banner asset in your resource directories. This banner is a wide-format icon with a 16:9 aspect ratio, typically 320x180 pixels, which acts as the interactive tile on the Android TV home screen.

Designing for the 10-Foot Interface

An interface that works beautifully on a mobile screen will fail on a television display. Users typically sit roughly ten feet away from a TV screen, meaning small text, tightly packed buttons, and subtle hover states are unusable. Your styling must adjust dynamically when launched on a TV platform.

  • Scale Typography: All text elements must be significantly larger than mobile equivalents. Use relative scaling units such as viewport width or viewport height to ensure text adapts smoothly to 4K and 1080p television screens.
  • High-Contrast Focus Indicators: Since there is no mouse cursor or physical touch input, the user navigates by shifting focus from one element to another. Active elements must feature highly obvious focus borders, scale changes, or background transitions.
  • Prevent Content Clipping: Television screens suffer from overscan, where the outer edges of the display area are clipped by the hardware. Maintain a safe zone margin of at least 5% on all outer edges of your web layout to ensure critical navigation elements remain fully visible.

Implementing D-Pad Navigation in JavaScript

The primary control mechanism for Android TV is a directional pad remote control, which emits standard keyboard events. Your web application must listen for these keyboard events and translate them into focus movements across your application layout.

The system remote control maps to standard keyboard directional values. You must intercept these keystrokes within your global application controller to manage focus dynamically:

window.addEventListener('keydown', (event) => {
  switch(event.key) {
    case 'ArrowUp':
      moveFocusUp();
      break;
    case 'ArrowDown':
      moveFocusDown();
      break;
    case 'ArrowLeft':
      moveFocusLeft();
      break;
    case 'ArrowRight':
      moveFocusRight();
      break;
    case 'Enter':
      triggerActiveElement();
      break;
  }
});

To make navigation intuitive, use standard interactive HTML elements such as buttons and anchor tags, which inherently support keyboard focus states. You can use CSS focus rules to visually highlight these elements as the user navigates through your web interfaces:

button:focus, a:focus {
  outline: 4px solid #3b82f6;
  transform: scale(1.05);
  transition: transform 0.2s ease-in-out;
}

Google Play TV Policy Requirements

Google enforces strict quality rules for apps published to the TV category. Before your application is approved for the Android TV Google Play Store, reviewers verify several aspects of your app package:

RequirementSpecificationImpact of Failure
TV Banner Icon16:9 aspect ratio PNG asset (320x180 px)App rejected during listing validation
Input CompatibilityFully operable using directional remote keysApp rejected during manual review testing
Landscape LayoutLocked to horizontal display presentationScreen rotation crashes, UI rendering errors
No Web ControlsCompletely free of browser URL displaysRejection under Minimum Functionality rules

Additionally, confirm that your Digital Asset Links file is correctly served from your secure domain. Since a television screen has no natural address bar, any breakdown in your asset verification will cause the browser container to show a generic URL header at the top of the TV display, leading to an immediate policy rejection during Google Play certification.

Testing Your TV TWA App Locally

To test your TWA implementation on a television screen, establish an Android Debug Bridge connection to an Android TV hardware developer device or a standard Google TV emulator within Android Studio. Run the build to verify that your service worker functions correctly offline, focus elements respond smoothly to remote inputs, and overscan safe margins prevent any layout clipping. This systematic testing ensures a seamless release cycle on the Google Play Store.

Ready to ship your Android app?

Paste your PWA URL, get a signed APK and a Google Play ready AAB in minutes.

Build my app