Search

Users can use the search field on the Home screen to search for items in any application on the device, including third-party applications. The search can also include content that is not stored on the device, such as an organization's database or a web site.

This screen shows a search field and search results on the Home screen.

Users can also use a search field in an application to search for items in that application. For example, users can search for an email message in a message list, a song in the Media application, or a contact in the contact list. In some cases, you might want to display search results from other applications.

In some applications, the search field appears on the screen. In other cases, search is available from the full menu, the pop-up menu, or the toolbar. As users type text in a search field, display the search results. If a large number of search results is returned, you can allow users to narrow their search to a field or a group of fields. For example, if users search the message list, they can use the drop-down list to the right of the search field to narrow their search to the To field or the Subject field. For more information about adding a search field to your application, see the BlackBerry Java Application Integration Development Guide.

This screen shows a search field and search results in the Contacts application.

Users can perform the following actions in a search field:

Action

BlackBerry devices with a trackpad only

BlackBerry devices with a touch screen and a trackpad

Open a highlighted item in the search results.

  • Press the Enter key.
  • Click the trackpad.
  • Tap the screen.
  • Press the Enter key.
  • Click the trackpad.

Display a pop-up menu with actions for a search result (for example, call a contact)

Click and hold the trackpad.

  • Touch and hold a search result on the screen.
  • Click and hold the trackpad.

You can register content in your application so that it can be included in search results. You can also register your application as a way for users to extend a search. For example, if users search for a song in the Media application and do not find the song, you can allow users to search your application as an alternative source of search results. For more information about registering content or an application, see the BlackBerry Java Application Integration Development Guide.

Best practice: Implementing search

  • Use the net.rim.device.api.unifiedsearch package to implement search capabilities. For more information about implementing search, see the API reference guide for the BlackBerry® Java® SDK and the BlackBerry Java Application Integration Development Guide.
  • Be selective with the content that you register to be included in search results. Only register content that provides meaningful search results for users.
  • Try to present the most relevant items at the beginning of the list of search results. For example, if users are looking for a restaurant that has several different locations, display the restaurant that is closest to the user's location at the beginning of the list of search results.
  • In the search results, bold the text that matches the text that users type. This approach helps users see why each item appears in the list of search results.
  • If users need to search for a word on a screen (for example, in a message or on a web page), use the term "Find" in the Menu.

Implementing search fields

  • Set the default focus to the search field. When the search results appear, set the default focus to the first item in the list of search results.
  • Use the term "Search" as hint text in the search field.
  • Do not make search fields case sensitive.
  • Place the search field below the title bar on an application screen.
  • Do not assign shortcut keys for a screen that includes a search field. If you want to use shortcut keys, provide alternative search functionality. For example, allow users to search for messages in a message list using the menu.
Next topic: Choice fields

Was this information helpful? Send us your comments.