Notifications Interface

This interface enables your gadget to inform users that new content is available from Alexa domains or an enabled Alexa skill. The interface exposes two directives that instruct your gadget to set and clear visual and audio indicators for the user.

This interface does not provide the content for a notification, it only provides the audio and visual indicators that your gadget can use to inform the user that new content is available. For example, the gadget might flash a yellow LED and play an audio file, at which time a user can retrieve any pending notifications by asking, "Alexa, what did I miss?" or "Alexa, what are my notifications?".

Supporting this Interface

To support this interface, the gadget must respond to the Echo device's Discover directive with a Discover.Response event that includes the following entry in its array of Capabilities:

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

Directives

This interface includes two directives: SetIndicator and ClearIndicator, as described next.

SetIndicator Directive

This directive instructs your gadget to render visual and audio indicators when a notification is available. The .proto file contents are as follows:

message SetIndicatorDirectiveProto {
   Directive directive = 1;
   message Directive {
      notifications.SetIndicatorDirectivePayloadProto payload = 2;
      header.DirectiveHeaderProto header = 1;
   }
}

message DirectiveHeaderProto {
   string namespace = 1;
   string name = 2;
   string messageId = 3;
   string dialogRequestId = 4;      
}

message SetIndicatorDirectivePayloadProto {
   bool persistVisualIndicator = 1;
   bool playAudioIndicator = 2;
   Asset asset = 3;
   message Asset {
      string assetId = 1;
      string url = 2;
   }
}

SetIndicatorDirectiveProto

The fields in this message are as follows:

Field Description Type
directive Contains a complete SetIndicator directive. Directive

Directive

The fields of the message are as follows:

Field Description Type
header Contains the header for this directive. DirectiveHeaderProto
payload Contains the payload for this directive. SetIndicatorDirectivePayloadProto

DirectiveHeaderProto

The fields of the message are as follows:

Field Description Type
namespace The namespace of this directive, which is Notifications. string
name The name of this directive, which is SetIndicator. string
messageId An ID that uniquely defines an instance of this directive. This string can be empty. string
dialogRequestId A unique ID that correlates this directive with a specific voice interaction from a user. You can ignore this field. string

SetIndicatorDirectivePayloadProto

The fields of the message are as follows:

Field Description Type
persistVisualIndicator Instructs the gadget to keep the visual indicator lit. bool
playAudioIndicator Instructs the gadget to play the audio indicator. bool
asset Contains information about the audio asset that the gadget can play if playAudioIndicator is true. Asset

Asset

The fields of the message are as follows:

Field Description Type
assetId The audio asset to be downloaded. Currently, this is an empty string. string
url The URL of the downloadable asset. Currently, this is an empty string. string

ClearIndicator Directive

This directive instructs your gadget to clear all active visual and audio indicators. The .proto file contents are as follows:

message ClearIndicatorDirectiveProto {
   Directive directive = 1;
   message Directive {
      notifications.ClearIndicatorDirectivePayloadProto payload = 2;
      header.DirectiveHeaderProto header = 1;
   }
}

message DirectiveHeaderProto {
   string namespace = 1;
   string name = 2;
   string messageId = 3;
   string dialogRequestId = 4;      
}

message ClearindicatorDirectivePayloadProto {
}

ClearindicatorDirectiveProto

The fields in this message are as follows:

Field Description Type
directive Contains a complete ClearIndicator directive. Directive

Directive

The fields of the message are as follows:

Field Description Type
header Contains the header for this directive. DirectiveHeaderProto
payload Contains the payload for this directive. ClearindicatorDirectivePayloadProto

DirectiveHeaderProto

The fields of the message are as follows:

Field Description Type
namespace The namespace of this directive, which is Notifications. string
name The name of this directive, which is ClearIndicator. string
messageId An ID that uniquely defines an instance of this directive. This string can be empty. string
dialogRequestId A unique ID that correlates this directive with a specific voice interaction from a user. You can ignore this field. string

ClearindicatorDirectivePayloadProto

This message contains no fields.