I used below code to insert a new info to a existing contacts, it’s run on emulator 2.2, 2.3.3, and android gingbear but can’t run on android 2.2.1 froyo.
here my code
if(updContact_textMail.getText().toString().length() != 0)
{
ops.add(ContentProviderOperation.newInsert(ContactsContract.Data.CONTENT_URI)
.withValue(ContactsContract.Data.RAW_CONTACT_ID, strId)
.withValue(Email.DATA1, updContact_textMail.getText().toString())
.withValue(Email.MIMETYPE, Email.CONTENT_ITEM_TYPE)
.withValue(Email.TYPE, Email.TYPE_WORK)
.build());
}
default save account contacts to phone for froyo is “vnd.sec.contact.phone” for accoutname and acounttype.
default save account contacts to phone for other ( emulator 2.2, gingbear 2.3.4…) is null for account name, account type.
What’s diffrerent?
Do you have Samsung SmartPhone?
vnd.sec.contact.phone is default user account using Samsung smartphones.
Samsung smartphone has two Contact type; one is Samsung default phonebook ans the other is Google account.
vnd.sec.contact.phone means ‘the contacts contains Samsung default phonebook’.
And I guess the device vendor(Samsung) customize the Contacts Applications.
that’sthe reason thar the code do not run.
HTH.