Bixby - Pass user input from once action to other

浪尽此生 提交于 2019-12-24 00:21:16

问题


I am trying to implement to read user input from one action and to read in other screen, like:

    user: xx
    Bixby: who's there?
    user: yyy
    Bixby: yyy who?

I am able to read user input yyy but unable to pass in different actions to display yyy who.

can you please help or guide what I am doing wrong or what will be best approach to do this kind of capsules?

Thanks in advance.


回答1:


This is how I would model the behavior of what you are probably trying to achieve.

Concepts 
 - Joke 
    - JokeQuestion (posed by 'Bixby')
    - JokeAnswer (answered by User)
Views
 - JokeResultView
 - JokeAnswerInputView
Layouts
 - JokeLayout
 - JokeQuestionLayout
 - JokeAnswerLayout
Action (all of these Actions take Joke as input AND output the Joke back)
 - GetJokeAnswerFromUser (get an Answer concept from the user and update the Interaction concept)
 - ShowJokeQuestionToUser (show the next JokeQuestion to the user)
Other Actions as needed?

With this arrangement, you always have access to both the JokeQuestion(s) and JokeAnswer(s) through the Joke Concept. The JokeResultView will drive what the user sees on the screen and you can build some sort of logic in your implementation to signal the beginning and the end of the Joke etc.

Try this out and see if it helps.



来源:https://stackoverflow.com/questions/55649384/bixby-pass-user-input-from-once-action-to-other

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!