输入视图导航模式不读取列表

时间:2019-07-05 18:30:54

标签: bixby

我尝试用导航模式实现输入视图,以便用户可以口头选择一个选项。目的是让我的胶囊在没有身体干预的情况下完全可用。

问题是我尝试遵循开发人员中心的示例,但似乎无法正常工作。 https://bixbydevelopers.com/dev/docs/dev-guide/developers/enhancing-UX.list-navigation

input-view {
  match: SpaceResort (result)
  message ("Which space resort would you like?")
  render {
    if (size(result) > 1) {
      selection-of (result) {
        navigation-mode {
          read-one {
            list-summary ("I found #{size(result)} resorts.")
            page-content {
              underflow-statement (This is the first resort.)
              item-selection-question (Do you want to book this resort?)
              overflow-statement (Those are all the resorts that meet your search.)
              overflow-question (What would you like to do?)
            }
          }
        }
        has-details (true)
        select-button-text ("Book")
        where-each (item) {
          layout-macro (space-resort-summary) {
            param (spaceResort) {
              expression (item)
            }
          }
        }
      }
    }
  }
}

在我的胶囊上,它将重复“ item-selection-question”,“ list-summary”或消息模板两次,并且不会大声读出项目列表。

1 个答案:

答案 0 :(得分:2)

在线DOC示例不是很清楚。

您需要在spoken-summary中添加子键where-each (item)。请检查更多here

在IDE测试中,您需要启用“免提”模式按钮。 enter image description here

当前在设备上测试此功能尚未启用。

同样,重复两次消息是一个错误,将很快得到解决。