A List Selector for the Google Assistant integration is really useful for letting the user choose from multiple options. The ON_ELEMENT_SELECTED() handler lets you get the ID of the selected item, if the user said the full name of the item, or just a cardinal choice (ie: 2nd)
The ON_ELEMENT_SELECTED() handler works great for the Google Phone, and Smart Display integrations. However when testing on the Speaker (Google Home) the ON_ELEMENT_SELECTED() is not triggered, and the Fallback intent is triggered.
Is it possible to add something to the Option Item so that items can be select on surfaces with no screen (Google Home)?
Or do you can to manually add intents to handle the Users selection. It would be very hard to handle, if the user reads back the title of an article for example without using the list selector.
The code I am currently using to construct a List of Headlines:
exports.ArticleHeadlineListBuilder = (articles) => {
/**
* Builds a Google Assistant Visual list to show article headlines
*/
const list = new List();
for (let i = 0; i < articles.length; i++) {
list.addItem(
(new OptionItem())
.setTitle(articles[i]['title'])
.setDescription(articles[i]['summary'].substring(0, 80) + '...')
.setImage({
url: articles[i]['img_url'],
accessibilityText: 'Article Headline Image',
})
.setKey(`${i}`)
);
}
return list
};