ContactPickerOptions

The ContactPickerOptions object contains options available for invoking the contact picker, see blackberry.pim.contacts.invokeContactPicker().

Installation:

To use this API in your project, add the contacts plugin:

webworks plugin add com.blackberry.pim.contacts
Properties:
String confirmButtonLabel
String[] fields
Number mode
String title
Constants:
Number MODE_ATTRIBUTE
Number MODE_MULTIPLE
Number MODE_SINGLE

confirmButtonLabel

A custom label to be displayed in the confirmation button of the picker.

If not specified, the default label will be used. Note that the confirmation button is only displayed if the picker is invoked in blackberry.pim.contacts.ContactPickerOptions.MODE_MULTIPLE.

Synopsis:

String ContactPickerOptions.confirmButtonLabel

fields

An array of field names (e.g. phoneNumbers, emails etc.) that should be used for filtering the contacts in the picker. (The names correspond to the field names in the blackberry.pim.contacts.Contact object.) A contact must have one or more of the attributes in this set in order to be displayed. If mode is ContactPickerOptions.MODE_MULTIPLE, this would determine the attributes to be shown in the picker. Fields must be specified in order for the picker to be invoked in ContactPickerOptions.MODE_MULTIPLE.

Synopsis:

String[] ContactPickerOptions.fields

mode

Describes the mode of the contact picker.

Synopsis:

Number ContactPickerOptions.mode

title

A custom message to be displayed in the title of the picker. If not specified, the default title will be used.

Synopsis:

String ContactPickerOptions.title

MODE_ATTRIBUTE

This mode allows the selection of an attribute of a contact. For example, a user can select a single phone number or an email address.

Synopsis:

constant
Number ContactPickerOptions.MODE_ATTRIBUTE = 2

MODE_MULTIPLE

This mode allows the selection of multiple contacts. The user can select multiple contacts and the selection completes when the user confirms the selection using the confirmation button.

Synopsis:

constant
Number ContactPickerOptions.MODE_MULTIPLE = 1

MODE_SINGLE

This mode allows the user to select a single contact. The selection will complete as soon as a contact is selected.

Synopsis:

constant
Number ContactPickerOptions.MODE_SINGLE = 0

Last modified: 2014-09-29



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus