Development Framework Comparison (Amazon Fire TV)
If you’re planning to build a media-based app for Amazon Fire TV, Amazon provides three frameworks that can help accelerate the development of your app. Each framework is oriented toward a different user group:
- Fire App Builder: Intended for Android developers building native apps using Android and Java
In addition to using different types of code, the three frameworks have somewhat different features. See the Feature Comparison table for more details.
- Web App Starter Kit for Amazon Fire TV
- Fire App Builder
- Feature Comparison
- Transitioning from Web Apps to Android Apps
Web App Starter Kit for Amazon Fire TV
Baked into the WASK template is the code needed to provide the large-screen experience consumers expect, as well everything needed to pass Amazon Appstore testing during the app submission process. At the bare minimum, you only need to provide a feed of media files, which the app will use to display a selectable list of categories and a rotating carousel of media content.
Here’s a screenshot of a simple layout:
While customizing or extending the basic WASK template, you can test your app using the Amazon Web App Tester. This is a Amazon Fire TV app used to test web apps on an actual device. The Web App Tester uses the same native app wrapper and web engine that will be used when the app is published, giving you an accurate preview of your app during development.
When your app is ready, you can use the Amazon Developer Portal to submit your app to the Amazon Appstore and have it published within minutes, with no native coding needed.
After signing up online, filling in the basic app details, and uploading thumbnail and preview images, you have a choice about where to host your app. You can either host the app’s asset files on your own web server and submit just the URL, or you can upload the assets to Amazon’s servers, where it will be bundled into a standalone packaged app.
After you have submitted your app, it will go through an Amazon ingestion service, and you will be notified when your app is published.
For a video tutorial on creating a WASK app from a YouTube feed, see the following video:
Fire App Builder
Fire App Builder, available on Github here, provides a Java-based framework that you can use to easily and quickly build streaming media Android apps for Amazon Fire TV. In contrast to the HTML5/CSS3/JS used with WASK, Fire App Builder uses Java Android code.
With Fire App Builder, you work in Android Studio, connect to your Amazon Fire TV device through Android Debug Bridge (ADB), and generate an APK (Android Package Kit) file to upload to the Amazon Appstore.
Although Fire App Builder uses Android APIs (particularly the Leanback Library), you do much of the configuration and customization through JSON and XML files. For example, through JSON and XML files, you can configure more than a dozen components to add to your app. Components provide out-of-the-box functionality for analytics, ads, authorization, purchasing, and media players.
Fire App Builder minimizes a dependence on Java expertise as much as possible, but for more deep-level integration, you can build on top of Fire App Builder. You can add your own custom Java classes to extend functionality through common interfaces and other code. (If you don’t care to do any custom Java programming, though, you don’t have to.)
With Fire App Builder, your media feed can be JSON or XML, in any structure using any tag names. When you configure Fire App Builder, you’ll write query syntax (using JSON Jayway syntax or XPath expressions) to target the various elements of your feed.
Your feed can also require tokens for media protected by DRM. Support for YouTube-based feeds and other video hosting services is on the roadmap but not currently included.
You have a lot of control to adjust the colors, layout, typography, and more — all by editing XML or JSON files where these settings have been extracted.
Here’s a screenshot of a sample app built using Fire App Builder:
A more compressed homepage layout is also available.
The following table compares the features available across the three platforms.
|Category||Feature||Fire App Builder||WASK|
|Feed Formats||JSON feeds|
|Media RSS XML Feeds|
|Custom XML Feeds|
|App Delivery Options||Installed as APK on device|
|Hosted app directly from URL|
|Media Types||HLS, DASH, Smooth Streaming, MP4|
|Media Players||Amazon Media Player|
|Authentication||Login with Amazon|
|Ad Services||Freewheel Ads|
|Global Catalog Search||Integration into the Fire TV catalog for global voice search.|
Again, you can add the services and features you want into either framework. The code is open (and open source), and you’re free to enhance, extend, or otherwise build on top of the framework’s code.
Transitioning from Web Apps to Android Apps
Some companies prefer to start out with a web app (such as WASK) and later transition to a Java Android app (such as with Fire App Builder). Note that when you submit an app to the Appstore, you select the app type (whether web app or Android app).
After you submit an app, you can’t transition from one app type to another (not yet anyway — app-type conversion is on the roadmap). If you started out with a web app and wanted to upload a new version that was an Android app, you couldn’t do this. You would need to upload a separate app entirely, which would mean losing any existing users.
If you’re planning to make the transition from a WASK to Fire App Builder, consider using Cordova with your web app. Cordova allows you to wrap your web app as an APK and submit the web app as an Android app. If you later decide to go entirely native with an Android app, you can publish a new version of your Android app in the Appstore.