Uh oh! We couldn’t find any match.
Please try other search keywords.
This sample demonstrates how to implement an input-view, which is used to define an Input Moment. 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.
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. 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. You can try this in the Simulator with the following intent:
intent: goal: SubmitSurvey
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.
Lets a user choose a set of dates.
intent: goal: RequestPTO
Lets a user choose a specific date.
intent: goal: DatePicker
Lets a user choose a specific time.
intent: goal: TimePicker
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
selection-of key. 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.
You can test it with this intent:
intent: goal: SelectPerson
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 intent:
intent: goal: SelectImage
You can test the multiple images picker with this intent:
intent: goal: MultiSelectImage