Components
The following components are involved in the app-only integration:- VSK Agent — A service built into the Fire OS on Fire TV that receives Alexa directives and broadcasts them as intents to apps on Fire TV. (All Fire OS versions are supported.)
- Fire TV. The device on which you run your app. Your Fire TV needs to have a microphone button on the remote control to make voice requests. The recommended Fire TV is Fire TV Stick 4K, but most Fire TV device will work.
- VSK Agent Client Library — An AAR library that is used if your app’s voice capabilities change based on the user’s login state (referred to as “dynamic capabilities integration”). The VSK Agent Client Library implements the Android Interface Definition Language API (AIDL) to connect to the VSK Agent on Fire OS.
- VSKApplicationAgentAPI — Optionally used if you don’t want to integrate the VSK Agent Client Library but instead want to write the code contained in the VSK Agent Client Library yourself to communicate with the VSK Agent. The VSKApplicationAgentAPI contains the necessary .aidl files and Java classes required for communicating with the VSK Agent on Fire TV.
- Alexa in the cloud — An Alexa service that receives the customer’s request (utterance), performs natural language processing to parse the request and determine the intent, and then packages it up into a directive (JSON-block) that can be handled by the Video Skill API.
- Alexa Video Skill API — A service that sends directives from Alexa in the cloud to the Fire TV VSK Agent, which then broadcasts the directives as an intent. Different interfaces handle different types of directives. You can browse more details here: API Reference Overview.
- Your Android app — A native Android app that can show streaming media content to users. If you don’t already have an app, you can use the sample app as a starting point (otherwise, use it for reference as you write your own code).
- BroadcastReceiver class — The class in your app where you accept and handle the directives Alexa sends to your app by way of the VSK Agent on Fire TV.
- DynamicCapabilityReporter class — The class in your app that reports capabilities based on the user state. As part of the VSK Agent Client Library initialization, this class creates an instance of the VSK Agent client.
High-level Workflow
The high-level workflow for app-integrations is as follows:- A customer says a request to Alexa. Alexa in the cloud interprets the request as a specific type of utterance and packages the information into a directive.
- Alexa routes the directive to a Fire TV device by way of the Video Skill API. Different interfaces in the Video Skill API handle different types of directives. The primary interface is
RemoteVideoPlayer, which sends two types of directives:SearchAndPlaydirectives andSearchAndDisplayResultsdirectives.SearchAndPlaydirectives are “watch/play …” requests, whileSearchAndDisplayResultsdirectives are “search/find …” requests. (Although the Video Skill API has more interfaces, onlyRemoteVideoPlayeris recommended for Fire TV partners.) - On Fire TV, a service called a VSK Agent receives the Alexa directives and broadcasts them as an Android intent. The intent is a packet of information that indicates an operation or action that needs to be performed.
- Your app’s manifest contains an intent filter and a BroadcastReceiver. The intent filter (declared in your app’s manifest) specifies that your app is listening for intents from the VSK Agent (it filters the intents to these types). The BroadcastReceiver specifies the particular receiver that can handle the intents. When the VSK Agent broadcasts an intent containing an Alexa directive, your app handles the intent.
- The logic in your BroadcastReceiver reads the directive and handles it accordingly (such as getting the requested video the customer requested). You are responsible for writing the logic to handle the requests.
- Your BroadcastReceiver sends a message (a PendingIntent) back to the VSK Agent to let it know your app processed the directive successfully. The response status is a Boolean indicating whether the directive was handled successfully or not.

