Gracias por tu visita. Esta página solo está disponible en inglés.

Alexa.InteractionMode (v1.0)

The Alexa.InteractionMode interface is one of the APIs available for the Alexa Presentation Language (APL). Use the Alexa.InteractionMode interface to publish the supported interaction modes for your device.

An interaction mode defines a way that a user can interact with your device. For example, a tablet mode might support touch input, keyboard input, and video playback, while an auto display mode might support touch input and directional keyboard input but not video (for safety reasons). Each supported mode must have a unique identifier.

Some properties related to interaction modes may be defined by other interfaces, such as Alexa.Presentation.APL.Video defining the supported codecs for video playback or Alexa.Display defining general support for touch interactions.

Publish your Alexa.InteractionMode characteristics to the Alexa cloud upon device startup.

To learn more about APL, its interfaces, and how to use those interfaces together, see Alexa Presentation Language (APL) Overview.

Capabilities API

Declare version 1.0 of the Alexa.InteractionMode interface in your call to the Capabilities API. For more details, see Capabilities API.

Sample Declaration

{
    "type": "AlexaInterface",
    "interface": "Alexa.InteractionMode",
    "version": "1.0"
}

Object Syntax

The following code snippet shows the parameters, valid values, and types for the Alexa.InteractionMode interface:


{
    "type": "AlexaInterface",
    "interface": "Alexa.InteractionMode",
    "version": "1.0",
    "configurations" : {
        “interactionModes” : [
            {
                "uiMode": ["HUB", "TV", "MOBILE", "PC", "AUTO", "HEADLESS"],
                “id” : "{{STRING}}",
                “interactionDistance” : {
                    "unit" : [ "CENTIMETERS" | "INCHES" ],
                    "value" : {{DECIMAL}}
                },
                “touch” : [ "SUPPORTED" | "UNSUPPORTED" ],
                "keyboard" : [ "SUPPORTED" | "UNSUPPORTED" ],
                “video” : [ "SUPPORTED" | "UNSUPPORTED" ]
            }, ...
        ]
    }
}

Configuration Parameters

The following table lists the parameters, valid values, and types for the Alexa.InteractionMode interface.

Field Type Required? Description
interactionModes Array of objects Yes Collection of supported interaction modes.
interactionModes.uiMode String Yes

The interaction mode type. The following values are valid:

  • AUTO: Automotive device such as an in-dash head unit. Can also refer to a plug-in device that uses the in-dash display.
  • HUB: Standalone device, usually with a touchscreen designed for voice-first interactions. Examplees include Echo Spot, Echo Show, and Fire HD tablets.
  • MOBILE: Mobile or tablet app. Examples are the Alexa mobile app and the Amazon Shopping app.
  • PC: PC-class device, including desktops and laptops.
  • TV: A TV or TV-class device such as a set-top box or game console, such as Fire TV.
  • HEADLESS: A device without a screen. Examples include the Echo, Echo Dot, and Alexa Built-in soundbars.
interactionModes.id String Yes Unique, opaque identifier of the interaction mode.
interactionModes.interactionDistance Object Yes Expected interaction distance of the user from the device.
interactionModes.interactionDistance.
unit
string Yes Unit of measurement for interaction distance. Supported values are "CENTIMETER" or "INCHES".
interactionModes.interactionDistance.
value
Number Yes Numeric value of the interaction distance in "CENTIMETERS" or "INCHES".
interactionModes.touch String Yes Touch modes supported by the interaction mode. Valid values are "SUPPORTED" or "UNSUPPORTED".
interactionModes.keyboard String Yes Indicates the keyboard modes supported within the interaction mode. Valid values are "SUPPORTED" or "UNSUPPORTED".
interactionModes.video String Yes Indicates that video playback is supported within the given interaction mode. Values are either "SUPPORTED" or "UNSUPPORTED".