# SmartTube for Android TV: Key Features and Technical Architecture

> Explore SmartTube for Android TV, a free open-source YouTube client. Discover features like 8K HDR playback, SponsorBlock integration, and a Google-free experience.

- Repository: [Yuriy L/SmartTube](https://github.com/yuliskov/SmartTube)
- Tags: deep-dive
- Published: 2026-09-14

---

**SmartTube is a free, open-source YouTube client designed specifically for Android TV devices, offering 8K HDR playback, SponsorBlock integration for skipping sponsored segments, and a Google-free experience built on the Leanback design pattern.**

SmartTube (repository: `yuliskov/SmartTube`) reimagines YouTube for television screens by implementing Google's official **Leanback** architecture. This approach delivers true 10-foot UI navigation while maintaining complete independence from Google Play Services, ensuring compatibility with Fire TV sticks, Android TV boxes, and de-Googled devices.

## TV-Optimized Interface Following Leanback Architecture

The application's UI framework centers on `LeanbackActivity`, which extends `MotherActivity` to host fragments such as `BrowseActivity`, `ChannelActivity`, and `PlaybackActivity`. According to the source code in [[`LeanbackActivity.java`](https://github.com/yuliskov/SmartTube/blob/main/LeanbackActivity.java#L22-L30)](https://github.com/yuliskov/SmartTube/blob/master/smarttubetv/src/main/java/com/liskovsoft/smartyoutubetv2/tv/ui/common/LeanbackActivity.java), this base class supplies common UI scaffolding including side panels, focus handling, and d-pad navigation management.

This architecture ensures consistent navigation patterns across all screens, with automatic focus management and fragment lifecycle handling optimized specifically for remote control input rather than touch interfaces.

## High-Resolution Playback via ExoPlayer

SmartTube supports video qualities up to **8K resolution**, **60 fps**, and **HDR** through hardware-accelerated decoding. The playback stack resides in `PlaybackPresenter`, which registers controller implementations including `SponsorBlockController` and various `BasePlayerController` subclasses.

As implemented in [[`PlaybackPresenter.java`](https://github.com/yuliskov/SmartTube/blob/main/PlaybackPresenter.java#L15-L22)](https://github.com/yuliskov/SmartTube/blob/master/common/src/main/java/com/liskovsoft/smartyoutubetv2/common/app/presenters/PlaybackPresenter.java), the presenter orchestrates media loading and delegates rendering to the bundled ExoPlayer (`exoplayer-amzn-2.10.6` module). This separation of concerns allows the player to handle adaptive streaming, codec selection, and buffering automatically while the presenter manages UI state and controller registration.

## SponsorBlock Integration for Ad-Free Viewing

The app integrates **SponsorBlock** functionality through `SponsorBlockController`, which reads user preferences from `SponsorBlockData` and injects segment-skip logic into the playback pipeline. As shown in [[`SponsorBlockController.java`](https://github.com/yuliskov/SmartTube/blob/main/SponsorBlockController.java#L20-L34)](https://github.com/yuliskov/SmartTube/blob/master/common/src/main/java/com/liskovsoft/smartyoutubetv2/common/app/models/playback/controllers/SponsorBlockController.java), the controller monitors playback position against crowdsourced sponsor segment databases to automatically skip intros, outros, and sponsored content.

You can programmatically configure SponsorBlock behavior using the `SponsorBlockData` singleton:

```java
// Obtain the SponsorBlock data singleton
SponsorBlockData sbData = SponsorBlockData.instance(context);

// Turn the feature on
sbData.setSponsorBlockEnabled(true);

// Choose which categories to skip (e.g., "sponsor" and "intro")
sbData.setAction("sponsor", SponsorBlockData.ACTION_SKIP_WITH_TOAST);
sbData.setAction("intro",   SponsorBlockData.ACTION_SKIP_ONLY);

```

*Source:* [[`SponsorBlockData.java`](https://github.com/yuliskov/SmartTube/blob/main/SponsorBlockData.java)](https://github.com/yuliskov/SmartTube/blob/master/common/src/main/java/com/liskovsoft/smartyoutubetv2/common/prefs/SponsorBlockData.java)

## Advanced Playback Controls

### Adjustable Playback Speed

Users can modify playback speed on-the-fly through `PlaybackPresenter`, which persists the selected value across videos. The presenter forwards speed adjustment requests to ExoPlayer via the `BasePlayerController` API:

```java
PlaybackPresenter presenter = PlaybackPresenter.instance(context);
presenter.setSpeed(1.5f);   // 1.5× speed

```

### Picture-in-Picture Mode

**PiP mode** activates when users press Home or Back during playback, provided the "Background playback → Picture in picture" setting is enabled. The [[`PlaybackActivity.java`](https://github.com/yuliskov/SmartTube/blob/main/PlaybackActivity.java#L31-L36)](https://github.com/yuliskov/SmartTube/blob/master/smarttubetv/src/main/java/com/liskovsoft/smartyoutubetv2/tv/ui/playback/PlaybackActivity.java) implementation checks `isInPIPMode()` before applying skip actions, ensuring proper state management during window transitions.

### Live Chat and Remote Customization

For livestreams, SmartTube displays YouTube Live Chat alongside video content through a dedicated fragment within `PlaybackActivity`. Additionally, `ButtonSettings` stores user configurations for remote control shortcuts, applied by `PlaybackPresenter` to customize the on-screen control layout according to user preferences.

## Independence from Google Services

Unlike official YouTube clients, SmartTube operates **without Google Play Services** dependencies. All network operations—including video stream fetching and SponsorBlock data retrieval—use standard HTTP/HTTPS protocols rather than Google-specific APIs. This design ensures compatibility with Amazon Fire TV devices and Android TV boxes lacking Google certification or Play Store access.

## Built-in Updater and Internationalization

SmartTube includes an automatic update mechanism via `UpdateManager`, which reads release URLs from [[`update_urls.xml`](https://github.com/yuliskov/SmartTube/blob/main/update_urls.xml#L4-L5)](https://github.com/yuliskov/SmartTube/blob/master/common/src/ststable/res/values/update_urls.xml) and downloads APK updates at startup when user consent is granted.

The application supports internationalization through comprehensive [`strings.xml`](https://github.com/yuliskov/SmartTube/blob/main/strings.xml) resources located in `values-*` folders, providing UI translations for dozens of locales without requiring separate builds.

## Launching Playback Programmatically

Developers can initiate video playback by launching `PlaybackActivity` with appropriate extras:

```java
Intent intent = new Intent(context, PlaybackActivity.class);
intent.putExtra("videoId", "dQw4w9WgXcQ");   // YouTube video ID
intent.putExtra("title",   "Never Gonna Give You Up");
context.startActivity(intent);

```

*Source:* [[`PlaybackActivity.java`](https://github.com/yuliskov/SmartTube/blob/main/PlaybackActivity.java)](https://github.com/yuliskov/SmartTube/blob/master/smarttubetv/src/main/java/com/liskovsoft/smartyoutubetv2/tv/ui/playback/PlaybackActivity.java)

## Summary

- **Leanback Architecture**: Uses `LeanbackActivity` extending `MotherActivity` as a base class for TV-optimized navigation and focus handling.
- **High-Quality Playback**: Supports 8K/60fps/HDR through ExoPlayer integration managed by `PlaybackPresenter`.
- **SponsorBlock**: Crowdsourced segment skipping implemented via `SponsorBlockController` and configurable through `SponsorBlockData`.
- **Flexible Controls**: Offers adjustable playback speed, PiP mode, live chat view, and customizable remote button layouts.
- **Google-Free**: Operates without Play Services using standard HTTP networking for all data retrieval.
- **Self-Updating**: Includes `UpdateManager` and version check URLs defined in [`update_urls.xml`](https://github.com/yuliskov/SmartTube/blob/main/update_urls.xml).

## Frequently Asked Questions

### Does SmartTube require Google Play Services to function?

No. SmartTube is specifically designed to function without Google Play Services or the Google Play Store. According to the project architecture, all network calls use standard HTTP/HTTPS protocols, making the app compatible with Fire TV devices and de-Googled Android TV boxes.

### How does SponsorBlock integration work in SmartTube?

SponsorBlock functionality is implemented through the `SponsorBlockController` class, which registers with `PlaybackPresenter` to monitor playback positions against a crowdsourced database of sponsor segments. User preferences are stored in `SponsorBlockData`, allowing configuration of which segment types to skip and whether to show notification toasts when skipping occurs.

### Can SmartTube play 4K and 8K YouTube videos?

Yes. SmartTube supports resolutions up to 8K at 60 frames per second with HDR support. The playback engine uses ExoPlayer (version 2.10.6 in the Amazon-flavored module) with hardware acceleration, managed through the `PlaybackPresenter` class that handles adaptive streaming and codec selection automatically based on device capabilities.

### How do I update SmartTube on my Android TV device?

SmartTube includes a built-in updater that runs at startup. The `UpdateManager` class checks against URLs defined in [`update_urls.xml`](https://github.com/yuliskov/SmartTube/blob/main/update_urls.xml) to detect new releases. When available, the app prompts for one-click APK download and installation, eliminating the need to sideload updates manually via USB or file managers.