Bixby Developer Center

Guides
References

navigation-mode

optional

Navigation mode defines the list navigation experience for the user. You define this in a view for a given Moment and must choose between the several experiences available. Navigation mode supports using conditionals, so you can adjust the experience, depending on how many items the user can choose from or if the device is in hands-free mode. For more information on when to use the different read modes, see the Hands-Free and Multiple Devices Design Guide.

Examples

The following example follows an Input Moment example with an input-view.

input-view {
match: Person (candidates) {
from-output: FindPerson {
from-input: PersonName (name)
}
}
message {
template-macro (PERSON_SELECTION_PROMPT)
}
render {
selection-of (candidates) {
navigation-mode {
if ($handsFree) {
read-one {
with-navigation-conversation-drivers
list-summary {
template-macro (HANDS_FREE_PERSON_LIST_SUMMARY) {
param (name) {
if (exists(name)) {
expression (name)
}
}
}
}
page-content {
item-selection-question {
template-macro (HANDS_FREE_PERSON_ITEM_SELECTION_QUESTION)
}
overflow-statement {
template-macro (HANDS_FREE_PERSON_OVERFLOW_STATEMENT)
}
overflow-question {
template-macro (HANDS_FREE_PERSON_OVERFLOW_QUESTION)
}
underflow-statement {
template-macro (HANDS_FREE_PERSON_UNDERFLOW_STATEMENT)
}
}
}
}
}
where-each (candidate) {
layout-macro (PERSON_SUMMARY) {
param (person) {
expression (candidate)
}
}
spoken-summary {
template ("#{value(candidate.name)}")
}
}
}
}
}

View master on GitHub

Here is an example of a Result Moment with a result-view:

result-view {
match {
Movie (results)
}
message {
if (size(results) == 0) {
template ("#{event(results, 'NoResult')}")
} else {
template ("#{event(results, 'Result')}")
}
}
render {
if (size(results) == 1) {
layout-macro (MOVIE_DETAILS) {
param (movie) {
expression (results)
}
}
}
else-if (size(results) > 1) {
list-of (results) {
navigation-mode {
if ($handsFree) {
read-one {
list-summary {
template ("#{event(results, 'Result')}")
}
page-content {
item-selection-question {
template-macro (HANDS_FREE_MOVIE_ITEM_SELECTION_QUESTION)
}
overflow-statement {
template-macro (HANDS_FREE_MOVIE_OVERFLOW_STATEMENT)
}
overflow-question {
template-macro (HANDS_FREE_MOVIE_OVERFLOW_QUESTION)
}
underflow-statement {
template-macro (HANDS_FREE_MOVIE_UNDERFLOW_STATEMENT)
}
}
}
}
}
highlights {
select (pick) {
label {
template-macro (MOVIE_HIGHLIGHT_LABEL)
}
layout-macro (MOVIE_HIGHLIGHT) {
param (movie) {
expression (pick)
}
}
summary {
template-macro (HANDS_FREE_MOVIE_HIGHLIGHT_SUMMARY) {
param (movie) {
expression (pick)
}
}
}
}
}
where-each (result) {
if ($handsFree) {
layout-macro (MOVIE_HIGHLIGHT) {
param (movie) {
expression (result)
}
}
}
else {
layout-macro (MOVIE_SUMMARY) {
param (movie) {
expression (result)
}
}
}
spoken-summary {
template-macro (HANDS_FREE_MOVIE_NORMAL_SUMMARY) {
param (movie) {
expression (result)
}
}
}
}
}
}
}
}

View master on GitHub

Note

The $handsFree EL variable should be checked within a read-many or read-one block, not outside it in the navigation-mode or render block of a view. Using $handsFree directly in a navigation-mode or render is deprecated; in that context, it will always evaluate to true.

Child Keys

read-manual
optional
Starts a navigation mode that allows manual definition of paging intents
read-many
optional
Reads several items in a list to a user and asks if the user would like to choose one of the items on the current page
read-many-and-next
optional
Reads several items on the results list and asks the user if they'd like the next page of results read
read-one
optional
Reads one item at a time for the reader and then asks if the user wants to choose it
read-one-and-next
optional
Reads an item from the given list and asks the user if they want to hear the next item on the list