|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
This interface represents a contact contained in the default RIM BlackBerry address book.
This interface defines extended fields in addition to the standard fields that are used to reference fields with the BlackBerryContact.
You can use any of the static field constants defined here in your code on any valid BlackBerryContact instance.
BlackBerryContact objects support the following fields and attributes:
| Field | Values Per Field | Supported Attributes |
|---|---|---|
| Contact.BIRTHDAY | 1 | PIMItem.ATTR_NONE |
| Contact.NAME | 1 | PIMItem.ATTR_NONE |
| Contact.TITLE | 1 | PIMItem.ATTR_NONE |
| Contact.ORG | 1 | PIMItem.ATTR_NONE |
| Contact.ADDR | 1 | Contact.ATTR_WORK, Contact.ATTR_HOME |
| Contact.NOTE | 1 | PIMItem.ATTR_NONE |
| Contact.TEL | 8 | Contact.ATTR_WORK, Contact.ATTR_HOME, Contact.ATTR_MOBILE, Contact.ATTR_PAGER, Contact.ATTR_FAX, Contact.ATTR_OTHER |
| Contact.EMAIL | 3 | PIMItem.ATTR_NONE |
| Contact.PHOTO | 1 | PIMItem.ATTR_NONE |
| Contact.UID | 1 | PIMItem.ATTR_NONE |
| BlackBerryContact.ANNIVERSARY | 1 | PIMItem.ATTR_NONE |
| BlackBerryContact.USER1 | 1 | PIMItem.ATTR_NONE |
| BlackBerryContact.USER2 | 1 | PIMItem.ATTR_NONE |
| BlackBerryContact.USER3 | 1 | PIMItem.ATTR_NONE |
| BlackBerryContact.USER4 | 1 | PIMItem.ATTR_NONE |
| BlackBerryContact.PIN | 1 | PIMItem.ATTR_NONE |
| BlackBerryContact.DCID | 1 | PIMItem.ATTR_NONE |
Special Notes
The NAME array:
The NAME_OTHER and NAME_SUFFIX entries of the NAME array are not
supported. They will be silently dropped if present in the parameter passed
in to the PIMItem.addStringArray(int, int, java.lang.String[]) method.
On commit, if the NAME_GIVEN and NAME_LAST entries in the NAME array are null, and the ORG field is not assigned, then default values of "Empty" and "Contact" are assigned to NAME_GIVEN and NAME_LAST respectively. The ADDR array:
The ADDR_POBOX entry of the ADDR array is not supported. It will be
silently dropped if present in the parameter passed in to the
PIMItem.addStringArray(int, int, java.lang.String[]) method.
The ADDR field supports at most 2 values, with each value having a
distinct attribute. The PIMItem.getAttributes(int, int) method for the ADDR field will
always return one of ATTR_WORK, or ATTR_HOME.
When adding an ADDR field, the attribute is chosen by examining the attributes parameter for the presence of one of the supported attributes in the following order: ATTR_HOME, ATTR_WORK, with the first one found that does not have a value already assigned to it being chosen. If no such attribute is found, then the first available attribute is used in the order: ATTR_WORK, ATTR_HOME, (even though the attribute is not present in the attributes parameter). The TEL field:
The TEL field supports at most 8 values, with each value having a
distinct attribute. The PIMItem.getAttributes(int, int) method for the TEL field will
always return one of ATTR_WORK, ATTR_HOME, ATTR_MOBILE, ATTR_PAGER, ATTR_FAX, or
ATTR_OTHER.
When adding a TEL field, the attribute is chosen by examining the attributes parameter for the presence of one of the supported attributes in the following order: ATTR_FAX, ATTR_PAGER, ATTR_MOBILE, ATTR_HOME, ATTR_WORK, ATTR_OTHER with the first one found that does not have a value already assigned to it being chosen. If no such attribute is found, or there are no vacant fields for values of the given attribute type, then the first available attribute is used in the order: ATTR_OTHER, ATTR_WORK, ATTR_HOME, ATTR_MOBILE, ATTR_PAGER, ATTR_FAX (even though the attribute is not present in the attributes parameter). The ORG field:
Setting the ORG field to the empty string "" is equivalent to removing any value from the field. The USER fields:
The labels for the extended fields USER1-4 can be modified using
BlackBerryPIMList.setFieldLabel(int, java.lang.String). Changing a label affects all
contacts in the list.
Contact,
PIMItem| Field Summary | ||
|
static int |
ANNIVERSARY
Anniversary date for a contact. |
|
static int |
ATTR_HOME2
Attribute used on values in the TEL field to indicate that the phone number is a secondary home number. |
|
static int |
ATTR_WORK2
Attribute used on values in the TEL field to indicate that the phone number is a secondary work number. |
|
static int |
DCID
Direct Connect ID field for communicating with devices on the iDEN network. |
|
static int |
PIN
Unique identifier for a BlackBerry device. |
|
static int |
USER1
User defined String field. |
|
static int |
USER2
User defined String field. |
|
static int |
USER3
User defined String field. |
|
static int |
USER4
User defined String field. |
| Fields inherited from interface javax.microedition.pim.Contact |
ADDR, ADDR_COUNTRY, ADDR_EXTRA, ADDR_LOCALITY, ADDR_POBOX, ADDR_POSTALCODE, ADDR_REGION, ADDR_STREET, ATTR_ASST, ATTR_AUTO, ATTR_FAX, ATTR_HOME, ATTR_MOBILE, ATTR_OTHER, ATTR_PAGER, ATTR_PREFERRED, ATTR_SMS, ATTR_WORK, BIRTHDAY, CLASS, CLASS_CONFIDENTIAL, CLASS_PRIVATE, CLASS_PUBLIC, EMAIL, FORMATTED_ADDR, FORMATTED_NAME, NAME, NAME_FAMILY, NAME_GIVEN, NAME_OTHER, NAME_PREFIX, NAME_SUFFIX, NICKNAME, NOTE, ORG, PHOTO, PHOTO_URL, PUBLIC_KEY, PUBLIC_KEY_STRING, REVISION, TEL, TITLE, UID, URL |
| Fields inherited from interface javax.microedition.pim.PIMItem |
ATTR_NONE, BINARY, BOOLEAN, DATE, EXTENDED_ATTRIBUTE_MIN_VALUE, EXTENDED_FIELD_MIN_VALUE, INT, STRING, STRING_ARRAY |
| Method Summary |
| Methods inherited from interface javax.microedition.pim.Contact |
getPreferredIndex |
| Methods inherited from interface javax.microedition.pim.PIMItem |
addBinary, addBoolean, addDate, addInt, addString, addStringArray, addToCategory, commit, countValues, getAttributes, getBinary, getBoolean, getCategories, getDate, getFields, getInt, getPIMList, getString, getStringArray, isModified, maxCategories, removeFromCategory, removeValue, setBinary, setBoolean, setDate, setInt, setString, setStringArray |
| Field Detail |
public static final int ANNIVERSARY
This field is of type Date.
public static final int ATTR_HOME2
public static final int ATTR_WORK2
public static final int DCID
This field is of type String and is only supported on iDEN devices.
To check if this field is supported use the
PIMList.isSupportedField(int) method.
public static final int PIN
This field is of type String, but the value must be a valid hex number.
public static final int USER1
The field can be named using the
BlackBerryPIMList.setFieldLabel(int, java.lang.String) method.
public static final int USER2
The field can be named using the
BlackBerryPIMList.setFieldLabel(int, java.lang.String) method.
public static final int USER3
The field can be named using the
BlackBerryPIMList.setFieldLabel(int, java.lang.String) method.
public static final int USER4
The field can be named using the
BlackBerryPIMList.setFieldLabel(int, java.lang.String) method.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2008 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.