AudioActivityTracker Interface (v1.0)

Focus management improves the accuracy of responses from Alexa, specifically, when a user makes an ambiguous request. Focus is managed in the cloud. A client simply informs Alexa which interface has focus of an audio channel, and when applicable, reports the idle time for each. This state information is sent in the context container under the AudioActivityTracker namespace.

See Focus Management for common use cases, and a complete interface to channel mapping.

Capabilities API

To use version 1.0 of the AudioActivityTracker interface, it must be declared in your call to the Capabilities API. For additional details, see Capabilities API.

{
    "type": "AlexaInterface",
    "interface": "AudioActivityTracker",
    "version": "1.0"
}

AudioActivityTracker Context

This context object lets Alexa know which interface last occupied an audio channel. If the channel (and subsequently the interface) is active, the idleTimeInMilliseconds is 0. If the channel is inactive, then the idleTimeInMilliseconds represents the amount of time elapsed since that channel had focus.

If a channel has not been used, then it should be excluded from the AudioActivityTracker context.

{
    "header": {
        "namespace": "AudioActivityTracker",
        "name": "ActivityState"
    },
    "payload": {
        "dialog": {
            "interface": "{{STRING}}",
            "idleTimeInMilliseconds": {{LONG}}
        },
        "alert": {
            "interface": "{{STRING}}",
            "idleTimeInMilliseconds": {{LONG}}
        },
        "content": {
            "interface": "{{STRING}}",
            "idleTimeInMilliseconds": {{LONG}}
        }
    }
}

Payload Parameters

Parameter Description Type
dialog An object that contains information about the interface that currently has focus of the dialog channel. If the channel has not been used, then it should be excluded from the `AudioActivityTracker` context. object
dialog.interface Specifies the interface that has focus of the dialog channel.
Accepted Value: "SpeechSynthesizer".
string
dialog.idleTimeInMilliseconds Specifies the elapsed time in milliseconds since the last action occurred on this channel. long
alert An object that contains information about the interface that currently has focus of the alerts channel. If the channel has not been used, then it should be excluded from the `AudioActivityTracker` context. object
alert.interface Specifies the interface that has focus of the alerts channel.
Accepted Values: "Alerts".
string
alert.idleTimeInMilliseconds Specifies the elapsed time in milliseconds since the last action occurred on this channel. long
content An object that contains information about the interface that currently has focus of the content channel. If the channel has not been used, then it should be excluded from the `AudioActivityTracker` context. object
content.interface Specifies the interface that has focus of the content channel.
Accepted Values: "AudioPlayer", "Bluetooth".
string
content.idleTimeInMilliseconds Specifies the elapsed time in milliseconds since the last action occurred on this channel. long