AVS Device SDK Interaction Model

This page documents any differences that might exist between the interaction model contained in the Alexa Voice Service (AVS) Device SDK and the Alexa Voice Service.

Activity Focus Manager Library (AFML) Multi Activity

The Alexa Voice Service (AVS) Device SDK 1.18 adds support for Activity Focus Manager Library (AFML) Multi Activity.

AFML Multi Activity enhances the behavior of a device so it can handle more than one Activity per Channel. This change means your device can switch back and forth between pre-determined activities without losing focus. AFML activities include Alexa speaking, music playing, alarms ringing, or other operations performed by the ChannelObserver Interface.

The following example illustrates how AFML might work when a user plays music from their phone.

  1. A user asks Alexa to play music on Amazon Music.
    • The AFML loads Amazon Music into the content channel and brings the music to the foreground. The music starts playing through the native media player loaded on the device, controlled by the AudioPlayer interface.
  2. A few minutes later, the user switches the source of the music to play through Bluetooth. For example, through a connected phone.
    • The AFML Multi Activity routes the music through the Bluetooth Interface. However, the instance of the native music player doesn't drop. Instead, it temporarily loses focus to a predetermined timeout of two minutes.
  3. After two minutes, one of the following actions occur.
    • The Bluetooth Interface takes the primary focus and the AudioPlayer interface drops.
    • The AudioPlayer interface regains focus and the music automatically starts playing again.

InterruptModel

The Alexa Voice Service (AVS) Device SDK 1.18 adds support for the InterruptModel interface.

InterruptModel interface is a new way to control how Channels interact with each other. Configuring the InterruptModel gives you more control over how events interact with your device. For example, you can specify that you want your device to duck in volume when it receives a custom notification alert.

Learn more about the implementation details in the InterruptModel Interface.

Note

The Interrupt Model is licensed under the Amazon Software License (AmzSL).