article

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: https://www.amazon.com/gp/product/B07CMDMMP9

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: https://developer.amazon.com/blogs/appstore/post/623addd5-6184-4e7f-a969-123a653cfb1a/implementing-voice-control-with-the-media-session-api-on-amazon-fire-tv

After that, to dive deeper into API details, please review the official documentation for Voice-enabled Transport Controls through the Android MediaSession API here: https://developer.amazon.com/docs/fire-tv/mediasession-api-integration.html

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: https://forums.developer.amazon.com/spaces/166/index.html

fire tabletfire tvalexa
10 |5000 characters needed characters left characters exceeded

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

Article

Contributors

levonl contributed to this article