Amazon Fire TV, developed and released by AMAZON in April 12, 2014. it’s a powerful streaming media device which helps to enable app and game developers to reach more customers in the living room.
The new Amazon Fire TV is mainly available to customers in US, UK, Germany, and Japan.
Amazon Fire TV has following specification -
- 5x the processing power of the latest generation Roku.
- 8x the processing power of Chromecast.
- MediaTek 64-t Quad-core processor.
- 8 GB of on-device memory.
- Add up to 128 GB of additional storage via microSD card slot.
- Dedicated GPU and Dolby Digital Plus surround sound.
- The new Amazon Fire TV is 75% more powerful with Wi-Fi.
- Support Alexa and 4K Ultra HD.
- Contains some feature like Parental control, Mirroring .
Ways to build the application for Fire tv
There are two ways to build the application.
- HTML5 (HTML5 web apps, Cordova apps).
Getting Started Amazon Fire TV Apps developement using Android
- Android 5.0 APIs(Lollipop).
- Android 5.0 Behavior Changes.
- V17 Leanback Library .
Setting Up Your Development Environment
To start developing apps for the Amazon Fire TV platform, you need to first set up your development environment.
- You must have the Java SE Development Kit 8 or later on your computer so Install the Java Development Kit (JDK).
- Install Android Studio and Set Up Android Studio .
- Connecting Fire TV Through Android Debug Bridge (ADB).
Set Up Android Debug Bridge
Android Debug Bridge (ADB) is a command-line utility for running and managing Android apps on your device or emulator. ADB is available when you install Android Studio but for Windows users need to install a special USB driver to set up the ABD.
Add Android Debug Bridge to Your Path
You need to add ADB to your PATH so you can more easily execute adb commands.Copy the full path of ADB form <Android SDK>/platform-tools
For Linux :
- Either go to the adb location and run ./adb in terminal or simply sudo apt-get install android-tools-adb run this commond
For Mac OSX:
- Add the path to your .bash_profile with the following command, replacing /Users/<your username>/Library/Android/sdk/platform-tools/ with your path to platform-tools.
echo 'export PATH=$PATH:/Users/<your username>/Library/Android/sdk/platform-tools/' >> ~/.bash_profile
- Restart your terminal session.
(In case If you don’t have a .bash_profile file in your user directory, so first create this one.)
- Click start and type view advanced system settings in the search box.
- Click view advanced system settings.
- When the system settings dialog opens, click the Environment Variables button.
- Under system variables (the lower pane), select Path and click Edit.
- On Windows 7 or 8, move your cursor to the farthest position on the right, type ; and then press Ctrl+V to insert the path to your SDK that you copied earlier. It may look like this: ;C:\Users\<your user name>\AppData\Local\Android\Sdk\platform-tools. Click OK on each of the three open dialog boxes to close them.
- On Windows 10, click the New button and add this location.
- Restart any terminal sessions, and then type adb. If you successfully added ADB to your path, you will see ADB help info rather than “command not found.”
Enable Debugging on Amazon Fire TV
You must enable both ADB and debugging on the Fire TV device before you can connect to it.
- From the main screen of your Fire TV, select Settings.
- Select System > Developer Options.
- Select ADB Debugging.
Connect ADB Through the Network
- From the Fire TV home screen, select Settings.
- Go to System > About > Network. Make note of the IP address listed on this screen.
- Open a terminal window.
- Make sure your Fire TV device and your computer are on the same network. You can use either a wifi network or a wired network.
- Run the following commands,
adb kill-server adb start-server adb connect <ipaddress> NOTE- <ipaddress> is the IP address of Fire TV device noted in the 2nd step. If the connection was successful, ADB responds with the message: connected to ipaddress :5555 Verify that the Fire TV device appears in the list of devices: adb devices ADB responds with the message: List of devices attached ipaddress:5555 device
Installing Your App
- When you run adb connect command you are able to see you fire device in your Andorid Studio you can select the device and install the application to your fire tv directly.
- To install the application run
adb install <path-to-apk-file>
- To re-install an app that already exists on the device, you can use the -r option to reinstall the app:
adb install -r <path-to-apk-file>
- You can also install the application using Usb.
- From Fire TV’s main screen, select Settings > System.
- Select system > Developer Options
- Select Developer Options > Turn off the USB debugging
- Install any File explore application and access the location of your application on Usb and click to install.
Running Your App
- Go to the Apps section in your fire tv and select the app to run in Fire tv.
- Using Command line use following command to run the application –
adb shell am start -n packageName/.LauncherActivity
ex – adb shell am start -n com.ttn.tv/.SplashActivity
Uninstalling Your App
1.To uninstall your app from Amazon Fire TV on the device itself:
- From Fire TV’s main screen, select Settings > Applications.
- Select Managed Installed Application > Select your app.
- Select Uninstall > Uninstall.
- From Fire TV’s main screen, select Apps > Go to Your App Library.
- Select your app > Select Uninstall > Uninstall.
3.To uninstall your app from Amazon Fire TV by Command Line:
adb uninstall packageName ex - adb uninstall com.ttn.tv