【发布时间】:2019-05-24 01:26:18
【问题描述】:
我希望传递/存储用户的语音输入。 Bixby 为用户提供了项目的结果视图列表,用户将说出他们想要的项目。然后,Bixby 将显示帐户名称列表,用户将说出其中的帐户名称。我想存储用户在每个列表之后所说的内容,以便稍后将它们组合起来进行 API 调用。
目前,我只在每次用户输入后创建了 Bixby 显示的列表,但我不知道如何继续使用这两个用户输入以在 API 调用中使用。我的authorization.bxb 已经全部配置好并且工作正常,它严格来说只能转发来自多个“时刻”的信息。我尝试使用 selection-of 创建输入视图,但在显示列表时仍然遇到问题。
PossibleDataMetrics.view.bxb
result-view {
match: Metric (metric) {
from-output: ListMetrics
}
message {
template ("What data metrics are you looking for?")
}
render {
layout {
section {
content {
partitioned {
content {
for-each (metric){
as (m) {
title-area {
slot1 {
text {
value ("#{value(m.metrics)}")
style (Title_S)
}
}
}
}
}
}
}
}
}
}
}
}
ProfileTitleCardResultView.view.bxb
result-view {
match: Profile (profile) {
from-output: GetProfiles
}
message {
template ("What profile would you like?")
}
render {
layout {
section {
content {
for-each (profile){
as (view) {
title-card {
title-area {
halign (Start)
slot1 {
single-line {
text {
style (Detail_L_Soft)
value ("Account: #{value(view.acctName)}")
}
}
}
slot2 {
single-line {
text {
style (Detail_M_Soft)
value ("Web property: #{value(view.webName)}")
}
}
}
slot3 {
single-line {
text {
style (Title_S)
value ("Profile: #{value(view.viewName)}")
}
}
}
}
}
}
}
}
}
}
}
}
当调用这些结果视图时,我希望从这两个结果列表中获取用户输入,以便在另一个操作中使用,以创建另一个列表,该列表基于用户对最初 2 个结果的回答。
【问题讨论】:
-
我们需要看代码。我们是程序员。
标签: bixby