Hi all,
I have a weird issue on an Android 2.2 device. I have an existing
contact and I do a modify operation on it via:
ContentProviderOperation.Builder builder =
ContentProviderOperation.newUpdate(ContactsContract.Data.CONTENT_URI)
.withSelection(ContactsContract.Data.CONTACT_ID + "=? AND " +
ContactsContract.Data.MIMETYPE + "=?",
new String[]{id,
ContactsContract.CommonDataKinds.StructuredName.CONTENT_ITEM_TYPE})
.withValue(ContactsContract.CommonDataKinds.StructuredName.DISPLAY_NAME,
displayName)
.withValue(ContactsContract.CommonDataKinds.StructuredName.FAMILY_NAME,
familyName)
.withValue(ContactsContract.CommonDataKinds.StructuredName.MIDDLE_NAME,
middleName)
.withValue(ContactsContract.CommonDataKinds.StructuredName.GIVEN_NAME,
givenName)
.withValue(ContactsContract.CommonDataKinds.StructuredName.PREFIX,
honorificPrefix)
.withValue(ContactsContract.CommonDataKinds.StructuredName.SUFFIX,
honorificSuffix);
mApp.getContentResolver().applyBatch(ContactsContract.AUTHORITY, ops);
The contact gets modified correctly. All of the new values show up
for the Contacts name.
However, if I look in my Contacts app there is a new contact called
"(Unknown)" that shows up after I do a modify. I can insert as many
contacts as I want but every modify creates a new "(Unknown)" contact.
Anyone have any ideas?
Simon Mac Donald
http://hi.im/simonmacdonald
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en