Sample Code for the Alexa Gadgets Toolkit

To get started with the Alexa Gadgets Toolkit, see the following code examples:

  • Handle Events – This topic contains sample code that shows how to validate the fields of a custom event.

  • Handle Directives – This section shows how to parse a custom directive that the gadget receives.

  • Example of Serializing and Deserializing Data – This topic contains sample code that serializes (encodes) and deserializes (decodes) directives and events for each Alexa Gadgets Toolkit interface using protocol buffer format. The sample code uses a C language implementation, but you can extend the concepts to other languages such as Python or Java.

Was this page helpful?

Last updated: Feb 14, 2022