Levon@Amazon avatar image
Levon@Amazon posted

How can I add voice support to my Android app?

If you have an existing Android application for Fire TV, you can enhance it by adding Alexa voice support to it. Having your app voice enabled will make it more intuitive for your end users to use, since now they will have an additional option to navigate and control your app. For example, in addition to clicking a button to play a video in your app, your users now will be able to say “Alexa, play” or “Alexa, rewind by 10 minutes” to either play the current video, or rewind it back by 10 minutes respectively.

To add Alexa voice support, you will need to implement MediaSession API, which is a collection of functionalities to allow the user to play, pause, rewind, fast-forward, or skip to previous or next episode in a series of videos.

A sample app for Fire TV demonstrates most of this functionality, so you can download and install it on your Fire TV to see what’s possible:

When you are ready to get into coding these features into your own media application, please start by reading this excellent introductory blog post to get you started:

After that, to dive deeper into API details, please review the official documentation for Voice-enabled Transport Controls through the Android MediaSession API here:

As always, if you have any additional questions that were not covered in the documentation linked above, please post them to our Developer Forums here:

fire tabletfire tvalexa
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.



levonl contributed to this article