BlackBerry Forums Support Community

Closed Thread
LinkBack Thread Tools
Old 06-25-2010, 10:09 AM   #1 (permalink)
Knows Where the Search Button Is
Join Date: May 2010
Model: 9000
Carrier: AT&T
Posts: 15
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Blackberry Contact Attributes: What's supported where, and how are they mapped?

Please Login to Remove!

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:
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:
Work 2
Home 2
Mobile 2
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?

Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Bogen 1W Self Amplified Wall Baffle ASWB1
Bogen 1W Self Amplified Wall Baffle ASWB1 pictureBogen 5 Watt Self Amplified Metal Ho AH5A
Bogen 5 Watt Self Amplified Metal Ho AH5A pictureBogen 60W Amplifier C60
Bogen 60W Amplifier C60 pictureBogen Self Amplified Ez Mount Ceiling Speaker ASM1
Bogen Self Amplified Ez Mount Ceiling Speaker ASM1 picture

Copyright 2004-2016
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.