Bixby Developer Center

Guides
References

Location Autosuggest (viv.location)

The viv.location capsule provides an Autosuggest action that works with the auto-complete Views component, allowing Bixby to present real-time completion suggestions for contacts and nearby locations (named points).

Models

Autosuggest Action

InputTypeNotes
searchTermSearchTermRequired
isFuzzyMatchAddressTypebooleantrue: use fuzzy matching for Geo addresses
isSearchGeoLocationsbooleantrue: search geo locations

Concepts

There are matching primitive concepts for each of the Autosuggest inputs.

ConceptTypeDescription
SearchTermtextterm used to search for contacts or locations
IsFuzzyMatchAddressTypebooleantrue: use fuzzy matching for Geo addresses
IsSearchGeoLocationsbooleantrue: search geo locations

Usage

The viv.location library imports viv.geo.

Note

Accessing the user's contacts requires the contacts library permission from bixby.contact. Read bixby.contact documentation for more details. If this permission is not granted, Autosuggest can still autocomplete named locations.

Use Autosuggest in an auto-complete block as demonstrated in this example.

  • Use a SearchTerm as an input.
  • Set the autocompletion source to an intent whose goal is AutoSuggest. Using collect-with lets autocompletion happen as the user types.
input-view {
match: DestinationPoint

message ("Where would you like to go?")

render {
macro (location:Autocomplete) {
select-button-text {
template ("Ok")
}
}
}
}

View on GitHub

By default, Autosuggest will use location data to help resolve suggestions. You can disable this by setting isSearchGeoLocations to false in the intent block:

intent {
goal: location.Autosuggest
value: location.SearchTerm$expr (query)
value: location.isSearchGeoLocations (false)
}

If you disable isSearchGeoLocations, then Autosuggest will not be able to autocomplete locations.

Setting isFuzzyMatchAddressType to true will allow "fuzzy matching" for address types such as home and office. By default, this is not enabled.