This sample demonstrates how to implement an
input-view, which is used to define an Input Moment, and how these input components display on various targets. The reference pages for specific components have more information on supported targets.
The Input Moment's primary goal is to gather information from the user. You can ask for information directly using a
form, or you can ask them to choose from a curated list using a specific picker.
Because you cannot submit a capsule with the
example namespace, in order to test a sample capsule on a device, you must change the
id in the
capsule.bxb file from
example to your organization's namespace before making a private submission.
For example, if your namespace is
A form enables you to ask for information directly from the user using elements like text or number fields and controls like switches or checkboxes. You can try this in the Simulator with the following utterance:
For example, you can ask a user for their full name using
text-input, their phone number with a
number-input, or a longer comment in a
textfield. For the simpler input fields, you can even add a mask or specify a
pattern-type, to ensure that the input from the user is formatted properly. Additionally, you can ask users if they want to sign up for a mailing list with a
switch or ask them to indicate preferences with several checkboxes.
Notice however that each new piece of information that is being asked of from the user is in its own separate
input-view file. This is to align with the design guidelines for an Input Moment. You never want to overwhelm the user with too much information at once. Further, this enables your user to give Bixby information in hands-free mode.
Bixby recognizes all the required inputs for the action
SubmitSurvey, and then calls each
input-view in the order they appear in the defined action, to get the input from the users.
At the end of the moment, to indicate that the survey is over, a simple
result-view is rendered with the message Thank you for your survey!.
Pickers enable you to choose information from a pre-determined list. You can test each picker with the utterances listed.
Lets a user choose a set of dates.
"Show calender picker"
Lets a user choose a specific date.
"Show date picker"
Lets a user choose a specific time.
"Show time picker"
While several of the pickers use platform-provided data that you can customize, you could also create a list of possibilities for the developer to choose from with the
You can test it with this utterance:
"Show selection picker"
This sample creates a list of
cell-card components, with each
cell-card listing information about a particular
Person. You should choose the appropriate component in this list according to the design guidelines, depending on how much information you need to give the user before they make a decision. If you need to list out hotel room details, an image card might be more appropriate for example.
Lets a user pick one or more images, depending on how the action you set in the
to-input is implemented. The action for
MultiSelectImage differs from the
SelectImage action in the
max cardinality and the validation of the inputs.
You can test the single image picker with this utterance:
"Show image picker"
You can test the multiple images picker with this utterance:
"Show multiple image picker"
Lets users browse content from a specified data range. As users provide more information in the Search field, Bixby further filters and displays the results
You can test the autocomplete component with this utterance: