Awesome
<p align="center"> <img src="https://m.media-amazon.com/images/G/01/mobile-apps/dex/avs/docs/ux/branding/mark1._TTH_.png"> <br/> <h1 align="center">Alexa Skills Kit SDK for Java</h1> <p align="center"><a href="https://travis-ci.org/alexa/alexa-skills-kit-sdk-for-java"><img src="https://travis-ci.org/alexa/alexa-skills-kit-sdk-for-java.png?branch=2.0.x"></a></p> </p>The ASK SDK for Java makes it easier for you to build highly engaging skills, by allowing you to spend more time on implementing features and less on writing boiler-plate code. <br/><br/>
<p align='center'> <a href='https://developer.amazon.com/docs/alexa-skills-kit-sdk-for-java/set-up-the-sdk.html'><img src='https://camo.githubusercontent.com/db9b9ce26327ad3bac57ec4daf0961a382d75790/68747470733a2f2f6d2e6d656469612d616d617a6f6e2e636f6d2f696d616765732f472f30312f6d6f62696c652d617070732f6465782f616c6578612f616c6578612d736b696c6c732d6b69742f7475746f7269616c732f67656e6572616c2f627574746f6e732f627574746f6e5f6765745f737461727465642e5f5454485f2e706e67'></a> </p>Package Versions
Module | Maven |
---|---|
ask-sdk | |
ask-sdk-core | |
ask-sdk-lambda-support | |
ask-sdk-servlet-support | |
ask-sdk-dynamodb-persistence-adapter | |
ask-sdk-apache-client | |
ask-sdk-freemarker | |
ask-sdk-runtime |
Alexa Features Supported by SDK
- Amazon Pay
- Audio Player
- Display – Body templates for devices with a screen
- Gadgets/Game Engine/Echo Buttons
- Directive Service (Progressive Response)
- Messaging
- Monetization
- Video
- Device Address
- Lists
- Request for customer contact information
- Obtain customer settings information
- Account Linking
- Entity Resolution
- Dialog Management
- Reminders
Preview Features
The following features are released as public preview. The interfaces might change in future releases.
Technical Documentation
Models
The SDK works on model classes rather than native Alexa JSON requests and responses. These model classes are generated using the Request, Response JSON schemas from the developer docs. The source code for the model classes can be found here.
SDK Setup
The SDK uses slf4j-api
. You need to provide your own logging binding. See: http://www.slf4j.org/manual.html#swapping
Samples
Hello World
This code sample will allow you to hear a response from Alexa when you trigger it. It is a minimal sample to get you familiarized with the Alexa Skills Kit and AWS Lambda.
Color Picker
This is a step-up in functionality from Hello World. It allows you to capture input from your user and demonstrates the use of Slots.
How To
This sample will walk first-time Alexa skill developers through all the required steps involved in creating a parameter-based skill using a template called ‘Minecraft Helper’. Ask how to craft an item in the game Minecraft, and this skill will give you instructions. The skill showcases:
- Custom slot type: demonstrates using custom slot types to handle a finite set of known values
- Dialog and Session state: Handles two models, both a one-shot ask and tell model, and a multi-turn dialog model.
- Usage of ResourceBundle to handle internalization
City Guide
Template for a local recommendations skill. Alexa uses the data that you provide to offer recommendations according to the user stated preferences. This Skill showcases:
- Custom slot type: demonstrates using custom slot types to handle a finite set of known values
- Dialog and Session state: Handles two models, both a one-shot ask and tell model, and a multi-turn dialog model.
- Usage of ResourceBundle to handle internalization
- Calling external APIs from the skill.
Movie Quotes
This Alexa sample skill is a basic Movie Quotes Quiz skill that makes use of Template Resolver feature of the Java SDK. A user can open up the skill, select a movie from a list, and then hear partial quotes from the selected movie. Then, they have to complete the quote.
Pet Match
Pet Match matches the user with a pet. When launched, this Alexa Skill will prompt the user for the information it needs to determine a match. Once all of the required information is collected, it will send the data to an external web service which processes the data and returns the match. Through this workshop, you will learn how to use advanced Alexa Skills Kit features to create and configure an Alexa Skill and AWS Lambda. The skill showcases the usage of Request and Response interceptors.
Tutorials
States Quiz
This tutorial will guide you in building a fully-featured skill. The skill features Built-In and Custom slots, as well as state management. The skill you build with this tutorial can be customized to build your own game.
Airplane Facts
This tutorial will demonstrate how to write skills for Echo Show and Echo Spot in Java using the Alexa Skills Kit (ASK) SDK v2.
Pager Karaoke
This tutorial demonstrates 3 features of APL: the Pager Component, SpeakItem Command, and accessing device characteristics in the skill code.
Other Language Alexa Skills Kit SDKs
<a href="https://github.com/alexa/alexa-skills-kit-sdk-for-nodejs"><img src="https://github.com/konpa/devicon/blob/master/icons/nodejs/nodejs-original.svg?sanitize=true" width="25px" /> Alexa Skills Kit SDK for NodeJS</a>
<a href="https://github.com/alexa/alexa-skills-kit-sdk-for-python"><img src="https://github.com/konpa/devicon/blob/master/icons/python/python-original.svg?sanitize=true" width="25px" /> Alexa Skills Kit SDK for Python</a>
Got Feedback?
Request and vote for Alexa features here!