Add support for template runtime interface.
mushfiq opened this issue · comments
Currently the project does not support TemplateRuntime interface.
For devices where users want to display text and images the supports are needed.
@mushfiq what changes are needed to inform AVS that the device supports templates? I suspect it needs to be alerted to the fact the device has a screen.
Great. If it's that simple then we should be able to simply check `directive.name == 'RenderTemplate'. Can you test that and let me know.
for directive in alexa_client.send_audio_file(f):
if directive.name in ['Speak', 'Play']:
...
elif directive.name == 'RenderTemplate':
print(directive.directive) # do something with directive template data
@mushfiq ping :)
Hi @richtier below is my findings:
elif directive.name == 'RenderTemplate':
print(directive.directive) # do something with directive template data
Does not work out of the box.
As the avs_client implementation looks only for octet-stream and it filters out other content type. To overcome that, the current (tested on 1.0.1) implementation needs to be adjusted.
BTW, sorry for late feedback :)
@mushfiq thanks I will add this feature soon.
How did you test it? I will aim to use your method for testing the new feature
@richtier as prerequisite the display card options should be enabled from the product settings.
AVS does not provide RenderTemplate out of the box, for some queries it has template data for some it does not. For testing, I had to try out different queries (generally for asking for a place would return a template).
I am also planning to implement it (but not sure when exactly I will be done with that). If I can finish soon, I will submit a PR.