The Problem

Consumers expect a clean, ad‑free Google TV home screen that surfaces only the apps they use, shows fresh content, and adapts to the day’s light. Existing launcher apps often add sponsored rows or slow down the UI.

What This Does

app/src/io/freemytv/HomeActivity.java is the launch screen. It builds a glass‑shelf layout (HomeView.java), populates it with the user’s installed apps, and pulls trending picks from TMDB (Recs.java). The weather and crypto widgets are rendered by DreamView.java. All data comes from HomeData.java, which reads user preferences via Prefs.java and fetches remote resources. AppLog.java handles lightweight logging across the stack. The app ships with a screensaver (Screensaver.java) that displays full‑screen picks and a persistent clock.

How It Is Wired

Entry point: Android launches HomeActivity (declared in AndroidManifest.xml).

  1. HomeActivity.onCreate() inflates activity_home.xml and creates a HomeView.
  2. HomeView.init() calls HomeData.load() to gather the app list and trending items.
  3. HomeData.load() reads stored settings from Prefs and triggers Recs.fetch() to call TMDB.
  4. Recs.fetch() uses the API key from config.properties; the response is parsed and passed back to HomeView for rendering.
  5. HomeActivity registers RemoteKeyService to intercept remote key events.
  6. RemoteKeyService forwards key codes to RemoteKeys and, via a broadcast receiver (HomeReceiver), can launch HomeActivity from the home button.
  7. The undo button in the UI calls HomeActivity.undoLastAction(), which in turn manipulates Prefs and refreshes the view.

External touchpoints: network requests to TMDB, local storage via SharedPreferences, and the TV’s remote key input. The widest blast radius is in HomeData and Recs; any change here propagates to the UI. RemoteKeyService is a critical hub for input handling, so modifications must preserve its broadcast logic.

How To Use It

Setup

# Install Java and Android tools
brew install --cask temurin android-commandlinetools android-platform-tools
sdkmanager "build-tools;34.0.0" "platforms;android-34"

# Clone the repo
git clone https://github.com/moses-y/free-my-tv
cd free-my-tv

Build

./build.sh

The first run creates config.properties. Edit it to set tmdb_key and city. Run ./build.sh again to rebuild with the new config.

Install

adb connect 192.168.1.50:5555
adb install -r FreeMyTV.apk

On TCL TVs, enable auto‑start:

adb shell "appops set io.freemytv AUTO_START allow || appops set io.freemytv APP_AUTO_START allow"

Configure The app’s settings screen (SettingsActivity.java) allows runtime changes; otherwise edit config.properties.

Real‑World Use

A homeowner installs the app, sets their city and TMDB API key, and then uses the remote’s home button to launch Free My TV. The shelf shows their favorite streaming apps, the weather card updates hourly, and the screensaver shows full‑screen picks with a glass clock. The one‑button undo restores the previous arrangement of apps.

Code Health & Issues

  • Low – No tests for HomeData, Recs, or HomeView.
  • Medium – CI only builds GitHub Pages (.github/workflows/pages.yml); no build or lint pipeline.
  • Low – Configuration is hard‑coded in config.example.properties; missing validation.

The Bottom Line

Free My TV delivers a slick, ad‑free Google TV experience with real‑time content and weather. Performance is good, but the lack of tests and CI limits confidence for long‑term maintenance. Suitable for teams that can afford to run manual checks and extend the codebase.