Adding an email to existing contact
<p>I am trying to add an email to existing contact.  Here's the code...  Any help is much appreciated!</p>

<pre><code> addToThisContact.setOnClickListener(new View.OnClickListener() 
        {
            public void onClick(View v)     
            {
                ArrayList&lt;ContentProviderOperation&gt; ops = new ArrayList&lt;ContentProviderOperation&gt;();

                int contactId = Integer.parseInt(id);

                ContentValues contentValues = new ContentValues();     
                 contentValues.put(ContactsContract.Data.RAW_CONTACT_ID, 
                        contactId);     
                contentValues.put(ContactsContract.Data.MIMETYPE, ContactsContract.
                        CommonDataKinds.Email.CONTENT_ITEM_TYPE);             
                contentValues.put(ContactsContract.CommonDataKinds.Email.DATA, 
                        "emailAddress@email.com");     
                 contentValues.put(ContactsContract.CommonDataKinds.
                    Email.TYPE, ContactsContract.
                        CommonDataKinds.Email.TYPE_HOME);      
                 ops.add(ContentProviderOperation.newInsert(ContactsContract.Data.
                         CONTENT_URI).withValues(contentValues).build()); 
            }
        });   
</code></pre>
