AMA Kit Media Control Interactions

Introduction

The Alexa Mobile Accessory (AMA) Kit uses a combination of state and Media Control commands to control music playback for a user. For accessory use cases involving music playback, the AMA Kit uses Media Capability and Audio Video Remote Control Profile (AVRCP) controls in collaboration. This page discusses the expected sequence of interactions for AMA Kit use cases involving music playback.

Use case: A user plays and pauses music playback locally

In this use case, a user initiates music through a 3P Music Service Provider (MSP) app, and then interrupts playback through an Alexa interaction. Because the user does not initiate music playback through Alexa, the Alexa app cannot control playback. In this scenario, the Alexa app sends a media control command that the accessory converts to an AVRCP command to interact with the phone OS.

The following sequence does a step-by-step walkthrough of the Alexa interactions when a user initiates music playback locally through a 3P music provider app and then interrupts that playback through an Alexa command:

  1. The user initiates music through the 3P music provider app.
  2. As the music is playing, user interacts with Alexa, asking a command such as “Alexa, what time is it?”
  3. Alexa initiates a speech interaction by sending a Start Speech message.
  4. Alexa enters a Listening state and then processes the request then sends a Media Control Pause message to the accessory.
  5. The accessory converts the Media Control Pause message to an AVRCP pause command, and sends the AVRCP pause command to the Phone OS, which pauses the music.
  6. Any associated Text-to-speech (TTS) commands continue on the A2DP protocol.
  7. After the TTS command ends, the Alexa app sends a Media Control Play message. The accessory coverts the Play message to an AVRCP Play command so that the music resumes playing locally.

The following diagram shows the flow of these steps:

User plays and pauses music locally

Use case: A user plays music via Alexa then later via a 3P MSP app

The Media Control interactions differ a bit when a user initiates music playback through the Alexa app. For this scenario, the accessory does not use AVRCP commands because of a limitation with iOS that prevents background audio from becoming the active player. Because of this limitation the phone cannot accept AVRCP commands. Use the Media Capability to work around this problem. To enable the Media Capability from the accessory to phone, the Alexa app sets the “AVRCP Override” state to "true".

The following sequence does a step-by-step walkthrough of the Alexa interactions when a user initiates music playback through Alexa and then initiates music playback again later through a 3P MSP app:

  1. The user initiates music through Alexa, issuing a command such as "Alexa, play music."
  2. The accessory continues with the same interaction model as specified in the Speech recognition section of AMA Protocol Specifications page.
  3. The Alexa app sends a Set State message with an AVRCP Override set to "true" so that it can use the Media Control commands. This step reconfigures the button presses previously used for AVRCP to now use the Media Capability Control messages.
  4. The user now controls music through the regular physical button interaction.
  5. At some later point in time, the user initiates music playback through the 3P MSP app.
  6. The Alexa app sets the state with the AVRCP override set to "false".
  7. Continue with the interaction model for a user initiating music playback locally, as described in the previous use case.

The following diagram shows the flow of these steps:

User plays music via Alexa then later via a 3P MSP app