-
-
Save germanviscuso/97661963f0f5d6b9219b30fad714d2db to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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']; | |
} | |
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