Skip to content

Instantly share code, notes, and snippets.

@ldelcasti
Created January 16, 2019 16:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ldelcasti/f018c9ca16e1533fafa7215265580867 to your computer and use it in GitHub Desktop.
Save ldelcasti/f018c9ca16e1533fafa7215265580867 to your computer and use it in GitHub Desktop.
// 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