Skip to content

Instantly share code, notes, and snippets.

@nikhilym
Created August 24, 2018 22:00
Show Gist options
  • Save nikhilym/d20d4f05e4ed9255ca416c9a255057b5 to your computer and use it in GitHub Desktop.
Save nikhilym/d20d4f05e4ed9255ca416c9a255057b5 to your computer and use it in GitHub Desktop.
Display check in ASK Python SDK
def is_display_supported(handler_input):
# type: (HandlerInput) -> bool
"""Check if display is supported by the skill."""
try:
if hasattr(handler_input.request_envelope.context.system.device.supported_interfaces, 'display'):
return handler_input.request_envelope.context.system.device.supported_interfaces.display is not None
except:
return False
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment