amzn / ftv-livetv-sample-tv-app

Apache License 2.0
24 stars 22 forks source link

Overview

Here you will find a sample implementation of integrating live linear content provided by your app with Amazon Fire TV. Find the full docs on Amazon's developer portal - https://developer.amazon.com/docs/fire-tv/introduction-linear-tv-integration.html.

This Sample TV App builds upon Google's Sample TV input.

Live TV integration on Fire-TV

If your application provides live content, you can surface it in the Fire TV's Channel Guide and the "On Now" row on Fire TV's home screen as well as make it searchable. The process for integrating live content into the Fire TV browse and search experience follows the same steps as outlined in the standard Android documentation. You need to create a TvInputService and provide channel information for Fire TV to consume. Optionally, you can implement a few shortcuts and alternative options in your app. For example, you can rely on Amazon services to surface programming metadata, and playback can be handled within your application and launched through deeplinks instead of being embedded within the Live TV player native to all Fire TV devices.

Fire TV supports the following Live TV features:

Note: to see these features in action, clone this repository then build with Android Studio and install the app on your Fire TV device.

Implementation Flow

TIF Diagram

Quick Links

Fire TV Metadata Fields

Channel Fields currently supported by Fire TV

These are the fields supported by Fire TV UI for channel metadata.

Program Fields currently supported by Fire TV

These are the fields currently supported in the Fire TV UI for Program objects if you are not using any external metadata source.

Note on Program and Channel Models

This repository contains implementations of the Program object which represents data pushed to the TIF programs table as well as the Channel object which represents data pushed to the TIF channels table. Additionally the repository implements an InternalProviderData object to represent data stored in the InternalProviderData column on the programs and channels tables.

You may utilize these implementations within your own app or use Android library implementations. Android provides these models in two places:

com.google.android.libraries.tv:companionlibrary:0.4.1 and the AndroidX library androidx.tvprovider:tvprovider:1.0.0. The models in these libaries are equivalent to the implementations in this repository with the exception of accepting the InternalProviderData object. Instead those models will take the serialized blob instead.

Questions, Support, and Feedback

If you have further questions, support or feedback needs please reach out to your Amazon contact who will be able to further assist you. If you have general feedback for the code examples here, feel free to raise a GitHub issue in this repository.

License

License under the Apache 2.0 license. See the LICENSE file for details.

Version

Version 1.0

Notice

Images/videos used in this sample are courtesy of the Blender Foundation, shared under copyright or Creative Commons license.