Specifying what users can do with your data in search results

When a user selects your search result and presses the menu key, the BlackBerry device displays a list of operations the user can perform with that data. For example, if your application holds recipes, you might want to enable your user to email a recipe or add the ingredients to a shopping list from a list of search results. Each item in a search result represents a SearchableEntity object from an application that registered data with the Unified Search Service. The UiAction class helps you specify an operation that a user or an application can invoke on your SearchableEntity objects.

In your application, you must create a UiAction subclass for each operation you want to make available to your user. You can expose your UiAction objects by using the getUiActions(Object, UiAction[]) method of your SearchableEntity object. You must configure an alternate entry point for the Unified Search Service to execute the operation a user selects.

Was this information helpful? Send us your comments.