The LocalFlix TV app shows the same LocalFlix page as the browser. It plays movies with a better player, so it opens more kinds of files than a TV browser. You control it only with the remote (arrow keys, OK, Back). No mouse pointer appears.
This guide is for Android TV and Google TV. Many Sony, TCL, Hisense, Philips and Xiaomi TVs use one of these, and so do the Chromecast with Google TV and the Nvidia Shield. Samsung and LG TVs do not. For those, use the TV browser. If you are not sure, look for the Google Play Store on your TV.
The TV app is optional. You can also use the TV browser (see Step 11 in the setup guide).
It takes about 45 to 90 minutes the first time. You do it once.
No laptop? Sending the app to the TV needs a computer once (a laptop, or a friend's computer). A phone cannot do it. Ask someone with a computer to install the app once, or use the TV browser. The app then works with a phone server. See Use an Android phone as the server.
You need:
- LocalFlix working on the laptop. Finish the setup guide up to Step 8 first.
- The TV on the same Wi-Fi as the laptop.
- The address of your TV (you will find it in Part 2).
- About 8 GB of free space on the laptop, only if you build the app yourself with Android Studio (Part 1, Way B). Downloading the ready app file (Way A) needs almost nothing.
The TV app is an app file (it ends with .apk). You send this file to your TV.
I put a ready app file on the Releases page, so you can download it. If you want to change the app, or you prefer to build it yourself, the source code is in the android-tv folder of the project, and you can build it with the free Android Studio.
- Open the latest release page in your browser.
- Scroll down to Assets. Click LocalFlix-TV.apk. The file goes to your Downloads folder.
If you do not see
LocalFlix-TV.apkin the list: I have not added the app file to that release yet. Use Way B, or open an issue and ask me.
Now go to Part 2. You do not need Way B.
- Open https://developer.android.com/studio in your browser.
- Download Android Studio. Open the file you downloaded.
- Follow the screens. Choose the standard choices. Click Next and Finish.
- Open Android Studio. The first time, it downloads more files. Wait until it finishes. This can take several minutes.
You need the whole project for this, not only the server ZIP. Open the LocalFlix page on GitHub, click the green Code button, click Download ZIP, and extract it.
- In Android Studio, click Open. (If a project is already open, choose File, then Open.)
- Choose the
android-tvfolder inside the project (the one that has theappfolder andsettings.gradleinside). Do not choose the main project folder. - Click OK.
- If Android Studio asks "Trust this project?", click Trust Project.
- Wait. At the bottom of the window you see a progress bar. The first time, Android Studio downloads many files and this can take 5 to 15 minutes. Wait until the bar is gone.
If it does not work:
- A message says a part is missing (for example an Android "SDK platform") and has a blue link such as Install. Click the link and follow the screens.
- A red message says the sync failed. Check that you have internet. Click Try Again (or File, then Sync Project with Gradle Files).
- In the top menu, click Build.
- Choose Generate App Bundles or APKs, then Generate APKs.
- In an older Android Studio, the menu says Build Bundle(s) / APK(s), then Build APK(s).
- Wait. At the bottom right, a message says that the APK was generated. Click locate in that message.
The app file is here:
android-tv\app\build\outputs\apk\debug\app-debug.apk
This path starts inside the project folder. Do not delete this file yet.
You must turn on "developer mode" on the TV. This lets your laptop send an app to the TV. Menu names are a little different on each TV. These are the usual ones:
- On the TV, open Settings, then Device Preferences, then About. (On some TVs: Settings, System, About.)
- Find Build (it may say Android TV OS build). Press OK on it 7 times. A message says "You are now a developer".
- Go back. Open Developer options. (It is in Device Preferences or in System.)
- Turn on USB debugging.
- Turn on ADB debugging over network, or Network debugging, or Wireless debugging. The name depends on your TV.
- The TV shows an address with a number, for example
192.168.1.34:5555. Write it down. This is the TV address.
You can also see the TV address in Settings, Network & Internet, your Wi-Fi name.
Choose Way A first. If it does not work, use Way B.
ADB is a small free tool that sends the app to the TV. Android Studio already put it on your laptop.
- Open PowerShell. If you built the app yourself (Way B), open it in the
android-tvfolder (open the folder in File Explorer, click the address bar, typepowershell, press Enter). If you downloaded the app file (Way A), any PowerShell window is fine. - Type this line and press Enter. It tells PowerShell where ADB is:
$adb = "$env:LOCALAPPDATA\Android\Sdk\platform-tools\adb.exe"- Connect to the TV. Use your TV address from Part 2:
& $adb connect 192.168.1.34:5555You should see:
connected to 192.168.1.34:5555.
- Look at the TV screen. It may ask Allow USB debugging? Choose Always allow from this computer, then OK (or Allow).
- Send the app:
If you downloaded the app file (Way A):
& $adb install -r "$env:USERPROFILE\Downloads\LocalFlix-TV.apk"If you built it yourself (Way B), in PowerShell in the android-tv folder:
& $adb install -r "app\build\outputs\apk\debug\app-debug.apk"You should see: the word
Success.
The LocalFlix icon now appears on the TV home screen. If you do not see it, open the list of all apps.
The -r in the command keeps the saved server address when you update the app later.
If it does not work:
- PowerShell says it cannot find
adb.exe: your Android Studio is in another place. Open https://developer.android.com/tools/releases/platform-tools, download the platform-tools ZIP, extract it, and change the first command to point to theadb.exeinside that folder.unable to connectorconnection refused: check that the TV is on, that ADB debugging over network is on, and that the address is right. Try again.- Newer TVs show Wireless debugging with a pairing code. Choose Pair device with pairing code. The TV shows an address and a 6 digit code. Run
& $adb pair ADDRESS:PORT, type the code, and then run& $adb connectwith the address shown on the main Wireless debugging screen. The pairing port and the connect port are different numbers.INSTALL_FAILED_...ordevice unauthorized: look at the TV screen, and allow the connection from your laptop. Then run the install command again.
- Copy the app file (
LocalFlix-TV.apk, orapp-debug.apkif you built it) to a USB stick. - Put the USB stick in the TV.
- On the TV, open a file manager app. If you do not have one, install a free one from the Play Store on the TV (for example "File Commander" or "X-plore").
- Open the USB stick and choose the app file.
- The TV may say it cannot install apps from this source. Choose Settings, and turn on Allow from this source. Go back and choose Install.
The LocalFlix icon appears on the TV home screen.
- Make sure LocalFlix is running on the laptop.
- On the TV, open LocalFlix.
- The app first checks the address it saved. Then it looks for the laptop by itself. This takes about 2 seconds.
- If it finds the laptop, the LocalFlix page opens. You type nothing.
- If not, a screen asks for the address. Type the Direct IP shown in the laptop window, for example
192.168.1.10(orhttp://192.168.1.10:8080). Press Connect. - The app saves the address after the laptop answers.
If the laptop is off, or the address is wrong, a friendly screen with Retry shows. It does not show an ugly browser error. Turn on LocalFlix on the laptop and press Retry.
- Press the Menu key on the remote (any time), or
- open Settings (the sliders icon at the top right) and choose Change TV server...
Choose the LocalFlix logo or the Home tab: the app looks for new movies, so you do not need to restart anything.
| Remote button | When you browse | While a movie plays |
|---|---|---|
| Arrow keys | Move the blue ring | Left or Right: go back or forward 10 seconds (hold for bigger steps). Up or Down: show the controls, then move between the time bar and the buttons. |
| OK | Open the movie or button | Controls hidden: pause or play. Controls shown: press the chosen button. |
| Back | Close the search list, a window or a screen. On the Home screen it closes the app. | Closes the Subtitles or Audio list, then hides the controls, then closes the player. |
| Menu | Change the laptop address | |
| Media keys | Play, Pause, Play/Pause, Rewind, Fast-forward, Next, Previous, Stop |
In the player, the Subtitles and Audio buttons open a list. Subtitles stay off until you choose one. The app remembers your choice. See Subtitles for size, position and delay.
Movies that the TV cannot play (for example some AVI files, or HEVC without hardware help): if ffmpeg is installed on the laptop (Step 4 of the setup guide), the app says "Converting for this TV..." and plays a converted movie. Jumping forward or back takes a moment in a converted movie, because it starts again. Without ffmpeg, a clear message appears.
Where you stopped is saved. The app offers it next time. When a movie in a folder ends, an Up next question appears.
Download the new LocalFlix-TV.apk from the Releases page (or build it again, Part 1.3) and run the install command again (Part 3, Way A). The -r keeps your saved laptop address.
Use this list after you install the app. It checks that everything works.
- New install, laptop running: the app finds the laptop by itself and shows the LocalFlix page (same colours, tabs, posters and search as the browser).
- New install, laptop not running: the connect screen shows, with Retry and an address box (not a browser error). Start LocalFlix, press Retry: it connects.
- Type a wrong address and press Connect: a clear message appears, and nothing is saved.
- No mouse pointer appears anywhere, in the pages or in the player.
- The arrow keys move the blue ring between tabs, search, buttons and movies in the right direction. Nothing gets stuck (also in Browse, Search and Settings).
- OK on a movie opens its details. OK on Play starts the player.
- In the player: Left and Right jump, OK pauses, Up and Down show the controls. The controls hide after about 4 seconds.
- Back, in the player: first the list closes, then the controls hide, then the player closes. Back, in the pages: first a window closes, then the screen before, and on Home the app closes.
- Play an AVI or HEVC file: the app says "Converting for this TV..." (needs ffmpeg). Without ffmpeg, a clear message appears.
- Subtitles: choose Off, then one track, then another. Audio: choose another track (in a converted movie it starts again).
- Stop a movie halfway and open it again: it continues from there. After the last file in a folder, Up next appears (OK plays it).
- After the player closes, the blue ring is on the movie you came from.
- In the search box, OK opens the on-screen keyboard.
- The logo and Home look for new movies and show a short message.
- Press Menu: the server screen opens. Back returns to the page.
- Open the same address on a phone or laptop browser: it works as before.
- Update the app with the install command (with
-r): the saved address is still there.
If something does not work, see Fixes for common problems.