05-13-2009, 10:38 AM
Join Date: May 2009
Post Thanks: 0
Thanked 0 Times in 0 Posts
| | PIM Address Book Update Issues
Please Login to Remove!
I'm building an app that updates data in the native address book. I'm testing my app on OS 4.5 and 4.6 and seeing some very strange results. When I have a contact that has all fields filled out in my native address book and I use the APIs to get the number of telephone numbers, for instance, I see duplicates of each value (Contact.countValues(Contact.TEL) = 16 instead of 8). I see this same problem for addresses - two work addresses and two home addresses.
Now, beyond the issue of duplicates, when I go to do an update on a particular index, it updates both, I don't seem to have the ability to update one individually using setString(). This makes updating the address book very messy and prone to error. So, I'm removing what's there, using addString() instead which seems very backwards to me.
I have a similar problem with emails. There are three email fields but I can't update them individually. One setString() call updates all three.
Does anyone have any insight on why this happens and the best way to build this update capability?