_context.getContentResolver().notifyChange(
                                ContactsContract.Contacts.CONTENT_URI, null);
                ArrayList<ContentProviderOperation> ops = new
ArrayList<ContentProviderOperation>();
                int nIndex = ops.size();
        
ops.add(ContentProviderOperation.newUpdate(ContactsContract.Contacts.CONTENT_URI)
                                
.withSelection(ContactsContract.RawContacts._ID, new String[]
{String.valueOf(_nContactID)})
                                
.withValue(ContactsContract.CommonDataKinds.StructuredName.FAMILY_NAME,
_sFamilyName)
                                
.withValue(ContactsContract.CommonDataKinds.StructuredName.GIVEN_NAME,
_sGivenName)
                                
.withValue(ContactsContract.CommonDataKinds.StructuredName.MIDDLE_NAME,
_sMiddleName)
                                .build());
                try {
        
_context.getContentResolver().applyBatch(ContactsContract.AUTHORITY,
ops);

it doesn't matter if _nContactID is the RAW_CONTACT_ID or the "normal"
CONTACT_ID.
I always get an out of bounds error...

I've also read that the ID should be the data row id. But I don't know
what row id this is...

On Apr 28, 9:56 am, Ali Chousein <ali.chous...@gmail.com> wrote:
> Can you post your code?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to