Amazon TV Introduction and Configuration for Development

24 / Jun / 2016 by Varun Mishra 0 comments

Introduction

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.

Availability

The new Amazon Fire TV is mainly available to customers in US, UK, Germany, and Japan.

Specifications

Amazon Fire TV has following specification –

  1. 5x the processing power of the latest generation Roku.
  2. 8x the processing power of Chromecast.
  3. MediaTek 64-t Quad-core processor.
  4. 8 GB of on-device memory.
  5. Add up to 128 GB of additional storage via microSD card slot.
  6. Dedicated GPU and Dolby Digital Plus surround sound.
  7. The new Amazon Fire TV is 75% more powerful with Wi-Fi.
  8. Support Alexa and 4K Ultra HD.
  9. Contains some feature like Parental controlMirroring .

Ways to build the application for Fire tv  

There are two ways to build the application.

  1. Android
  2. HTML5 (HTML5 web apps, Cordova apps).

Getting Started Amazon Fire TV Apps developement using Android

Supports –

  • 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.

  1. You must have the Java SE Development Kit 8 or later on your computer so  Install the Java Development Kit (JDK).
  2. Install Android Studio and Set Up Android Studio .
  3. 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 :

  1. 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:

  1. 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.
  1. echo 'export PATH=$PATH:/Users/<your username>/Library/Android/sdk/platform-tools/' >> ~/.bash_profile
  2. Restart your terminal session.

       (In case If you don’t have a .bash_profile file in your user directory, so first create this one.)

For Windows:

  1. Click start and type view advanced system settings in the search box.
  2. Click view advanced system settings.
  3. When the system settings dialog opens, click the Environment Variables button.
  4. Under system variables (the lower pane), select Path and click Edit.
  5. 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.
  6. On Windows 10, click the New button and add this location.
  7. 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.

  1. From the main screen of your Fire TV, select Settings.
  2. Select System > Developer Options.
  3. Select ADB Debugging.
ADB

Enable ADB

Connect ADB Through the Network

  1. From the Fire TV home screen, select Settings.
  2. Go to System > About > Network. Make note of the IP address listed on this screen.

    Get the IP of Fire TV

    Get the IP of Fire TV

  3. Open a terminal window.
  4. 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.
  5. 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

 

ADB

commands to connect the Amazon Fire TV

Installing Your App

  1. 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.

    rsz_1screenshot_from_2016-06-13_12-54-06

    Install the Application by Android Studio

  2. To install the application run
     adb install <path-to-apk-file>
    install

    Install the Application by ADB command

     

  3. 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>
  4. 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

    device-2016-06-13-165839

    Turn off the USB debugging to mount the USB

  • Install any File explore application and access the location of your application on Usb and click to install.

    Click apk to install the application

    Click .apk to install the application

Running Your App

  1. Go to the Apps section in your fire tv and select the app to run in Fire tv.
  2. 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.
Uninstall the Application from Manage Installed Application

Uninstall the Application from Manage Installed Application

or

  • From Fire TV’s main screen, select Apps > Go to Your App Library.
  • Select your app > Select Uninstall > Uninstall.
Uninstall the Application from Apps Library

Uninstall the Application from Apps Library

3.To uninstall your app from Amazon Fire TV by Command Line:

 adb uninstall packageName 
 ex - adb uninstall com.ttn.tv
FOUND THIS USEFUL? SHARE IT

Leave a Reply

Your email address will not be published. Required fields are marked *