Uh oh! We couldn’t find any match.

Please try other search keywords.

Bixby Developer Center

Guides

Location Search

This sample capsule highlights the following:

You can test this sample capsule in the Simulator with the following utterance:

Find me a ride

This is equivalent to this intent:

intent{
goal: FindRideShare
}

Download Capsule

Note

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 before making a private submission.

For example, if your namespace is acme, change example.locationSearch to acme.locationSearch.

Getting User Permissions

In order to access the user's current location and the user's profile information, including contacts, you need to ask for permission to access that information:

permissions {
user-profile-access
}

This automatically creates a prompt, in which the user can Allow or Deny the request for that information.

Using Geo

The geo library capsule is used to create namedPoint concepts, namely the DestinationPoint and SourcePoint models used to determine the starting and ending point of the shared ride. Both concept models use role-of(geo.NamedPoint), so that they have the properties needed to be geographical points of interest.

In order to do this, you need to import the geo capsule:

capsule {
capsule-imports {
import (viv.location) { as (location) version (1.0.1)}
import (viv.geo) { as (geo) version-from (location)}
}
...
}

Notice that the viv.geo capsule imports with the version-from the viv.location capsule, which ensures that capsule versions are compatible with each other.

Auto-Complete with Geo and Contact

This capsule also includes the DestinationPoint_Input.view.bxb file, which uses the auto-complete Views component coupled with contact and geo to automatically suggest locations for the DestinationPoint using the location.Autosuggest goal. Because location relies on geo for the Address property, the contact chosen can then be passed back as the DestinationPoint.