I'm writing an app that allows a user to enter a new contact, and, of course, would like to make the entry screen as much as possible like RIM's to give a seamless experience (I can't find any way of just opening the Blackberry "Add Contact" screen itself, and having it return me what the user entered, which would be my preferred way of doing this). In doing so, I have run into this question.
Is there some definitive documentation as to what attributes are supported for which fields, and how the Blackberry address book maps them?
Here is the main (well, OK, so far, only) specific anomaly. The Blackberry API documentation says this regarding Contact.TEL:
Quote:
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 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.
|
But the Blackberry contact data entry screen has these telephone fields:
Quote:
Work
Work 2
Home
Home 2
Mobile
Mobile 2
Pager
FAX
Other
|
As is obvious here, there is no Contact.TEL-ATTR_WORK2, Contact.TEL-ATTR_HOME2, etc. How are these phone numbers being stored? BTW, note also that this is nine phone fields, one more than the documentation says you can have (assuming "Other" is a telephone field; I haven't tried to store anything in it, but, if you enter data into it, it certainly enforces a phone number formatted string).
Experimenting with the software seems to validate the documentation, but that's not what the Blackberry contact entry screen seems to do.
Anyone out there run into this? Any pointers to more definitive documentation?
TIA,
Allen