/capsule-sample-shoe

This sample capsule shows how to include basic search in a capsule. The user can start with a simple utterance, such as "Find me some shoes," or do a more specific search, such as "Find me dancing shoes."

Primary LanguageJavaScriptApache License 2.0Apache-2.0


Bixby Simple Search Sample Capsule

Overview

This capsule is the the companion code to the Bixby Simple Search Capsule guide. This sample capsule shows how to include basic search in a capsule. The user can start with a simple utterance, such as "Find me some shoes," or do a more specific search, such as "Find me dancing shoes."


Development Notes

The UI is very basic (some simple dialogs and a layout). This example also demonstrates usage of Fetch action as a lazy source for the accessories property of a Shoe.

The FindShoe action model FindShoe.model.bxb is backed by the Javascript FindShoe.js. Note the parallel relationship for FindAccessories model and js files.

The FindShoe action is a Search, which uses the inputs as constraints. The FindAccessories action is actually a Fetch, which is a simple lookup of additional data from a single input.

The lazy-source, as its name implies, means that the data is only fetched when needed. In this example, it means that the fetch won't happen until the shoe-details-fragment.layout.bml is rendered.

For more details, check https://bixbydevelopers.com/dev/docs/reference/type/structure.property.lazy-source


Additional Resources

Your Source for Everything Bixby

Guides & Best Practices

Bixby Videos

Bixby Podcast

Bixby on Social Media

Need Support?

  • Have a feature request? Please suggest it in our Support Community to help us prioritize.
  • Have a technical question? Ask on Stack Overflow with tag “bixby”