Member-only story
Deploying Flutter App to Android TV
Including a demonstration of a Flutter Android TV app , showing how the “d-pad” (Android remote) can be accessed.
We just got one of these fancy new Android TV’s; And I’m a Flutter developer.
I’d like to make apps that I can play on the TV.
The thing to achieve first is deploying my own local app onto my Android TV.
First Build the App Locally and Make It Available for Download
- Build an app that has the “d-pad” support (here is one I prepared earlier: https://github.com/krisrandall/android_tv_dpad_basic)
- Use serve in the folder with the .apk so it’s available via port 80
- Use ngrok to get the location available on the internet
flutter build apk
cd build/app/outputs/flutter-apk/
serve
ngrok http 5000 # this in another tab
Next Install the App on your Android TV
- Go into Apps, open the Google Play Store, and
- Install an app that will allow browsing to a URL
(I found and recommend Downloader by AFTVnews) - Go home, open Settings (cog icon) > Apps > Security & restrictions
- Untick Verify apps, choose Unknown sources, and allow the new Downloader by AFTVnews app to do this