Get Started on Amazon Fire TV

Amazon Fire TV is just one of the many target platforms for You.i React Native apps. Use the instructions below to run our quick start app on an Amazon Fire TV device.

Before You Start

You can build a You.i React Native app for Amazon Fire TV on any of our supported development platforms: Linux, macOS, or Windows. Consult the Environment Setup topic for your chosen development platform to verify that everything is set up properly.

Once your dev environment is all set up, we recommend running through our Quick Start Guide. But if our Quick Start isn’t quick enough for you, here’s an even quicker start.

Install the You.i TV command line interface tool, You.i Platform, and any required dependencies youi-tv doctor requests.

yarn global add youi-cli
youi-tv login    # Enter your product key when prompted.
youi-tv install 6.15.0  # If asked, accept most recent version of Babel or other dependencies
youi-tv doctor   # Resolve any missing components (but don't worry about Android for now)

Set up scaffolding for your app with youi-tv init.

youi-tv init MyApp  # Create a folder called MyApp for your project
cd MyApp

Build for Android

To run our quick start app on Fire TV, you need to first build it for Android. Our Android Quick Start provides everything you need for this task.

For later reference, here’s the command that generates, builds, deploys and launches your app on Android:

youi-tv run -p android

Fire TV Stick Setup

If you’re deploying to a Fire TV stick, there are some extra steps. Otherwise, skip to Run Your App.

Because you’ll be connecting over wireless, you need the device’s IP address. To find it, go to Settings > About > Network.

Start the Android Debug Bridge and connect to your Fire TV via its IP address.

adb start-server
adb connect <device-IP-address>

Verify that the Fire TV stick you’re deploying to is recognized as the connected device.

adb devices

Run Your App

If you’ve installed a previous version of this package on your Fire TV device, uninstall it.

List the You.i Platform packages on your Fire TV device.

adb shell 'pm list packages' | grep "tv.youi.youiengine"

Uninstall the older version of this package, specifying the package name.

adb uninstall MyApp-debug.apk

Install the package and start the app.

adb install MyApp/youi/build/android/project/MyApp/build/outputs/apk/MyApp-debug.apk
adb shell am start -n <package-name>/<package-name>.<activity-name>

If You Had Issues

If you had any issues with this tutorial, you can download a zip file with the completed JavaScript and C++ files. The files contain updates for the entire tutorial and won’t run for all the steps, but they’re useful guides for adding lines of code.