Last active
January 12, 2019 05:19
-
-
Save ldelcasti/406eccac3fbfd74ceccf0562056fc5b6 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
//@Ldelcasti | |
// Lambda update | |
// Añadir antes de la respuesta para dispositivos APL | |
if (!APLsupport(handlerInput)) { | |
return handlerInput.responseBuilder | |
.speak(speechOutput) | |
.withSimpleCard(SKILL_NAME, randomFact) | |
.withShouldEndSession(true) | |
.getResponse(); | |
} | |
// Función para detectar Soporte APL en dispositivos Alexa | |
function APLsupport(handlerInput) { | |
const Interface = handlerInput.requestEnvelope.context.System.device.supportedInterfaces; | |
const APL = Interface['Alexa.Presentation.APL']; | |
return APL != null && APL != undefined; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment