Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
function supportsDisplay(handlerInput) {
// returns true if the skill is running on a device with a display (Echo Show, Echo Spot, etc.)
// Enable your skill for display as shown here: https://alexa.design/enabledisplay
return handlerInput.requestEnvelope.context &&
handlerInput.requestEnvelope.context.System &&
handlerInput.requestEnvelope.context.System.device &&
handlerInput.requestEnvelope.context.System.device.supportedInterfaces &&
handlerInput.requestEnvelope.context.System.device.supportedInterfaces.Display &&
handlerInput.requestEnvelope.context.System.device.supportedInterfaces.hasOwnProperty('Alexa.Presentation.APL');
}
function APLsupport(handlerInput) {
const Interface = handlerInput.requestEnvelope.context.System.device.supportedInterfaces;
return Interface['Alexa.Presentation.APL']?true:false;
}
if (!APLsupport(handlerInput)) {
return handlerInput.responseBuilder
.speak('APL no está soportado')
.getResponse();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.