Closed bobpskier closed 6 years ago
Hey @bobpskier , the code you provided is correct. handler_input.request_envelope.context.system.device.supported_interfaces
is the object which will provide you content regarding supported interfaces for the skill. Can you try using it and let us know if that is what you were trying to check?
Using the request_envelope.context worked correctly for me. Thanks.
I'm submitting a...
While writing a request handler such as:
@sb.request_handler(can_handle_func=is_intent_name("HelloWorldIntent")) def hello_world_intent_handler(handler_input):
I've noticed the handler_input object does not provide access to the supported interfaces for the device. In many use cases the function needs access to the supported interfaces for the device. IE: It wants to return a display template for an Echo Show if a display is available.
A javascript implementation would simply check for:
this.event.context.System.device.supportedInterfaces.Display
The handler_input object in the python SDK does not appear to provide access to the System object via the context object. IE: handler_input.context.System.
Is there a correct way using the alexa-skills-kit-sdk-for-python to determine the supportedInterfaces while handling the request?
I've also noticed that the handler_input object provides :
handler_input.request_envelope.context.system.device.supported_interfaces
Perhaps this is the correct location to detect this setting.