Sample Code for the Alexa Gadgets Toolkit
Note: Sign in to the developer console to build or publish your skill.
Note: On December 31, 2021, we paused support for third-party device makers working with Alexa Gadgets, while we work to create an even better developer and customer experience. Please stay tuned to the Amazon developer portal for updates. In the interim, please visit the landing pages for Alexa Voice Service, Alexa Connect Kit, and Alexa Skills Kit to discover ways you can provide new customer experiences with voice.
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.
Last updated: Feb 14, 2022