Created
January 16, 2019 16:42
-
-
Save ldelcasti/f018c9ca16e1533fafa7215265580867 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
// 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