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).
HomeActivity.onCreate()inflatesactivity_home.xmland creates aHomeView.HomeView.init()callsHomeData.load()to gather the app list and trending items.HomeData.load()reads stored settings fromPrefsand triggersRecs.fetch()to call TMDB.Recs.fetch()uses the API key fromconfig.properties; the response is parsed and passed back toHomeViewfor rendering.HomeActivityregistersRemoteKeyServiceto intercept remote key events.RemoteKeyServiceforwards key codes toRemoteKeysand, via a broadcast receiver (HomeReceiver), can launchHomeActivityfrom the home button.- The undo button in the UI calls
HomeActivity.undoLastAction(), which in turn manipulatesPrefsand 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, orHomeView. - 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.