title: Insert a new contact - why ContentValues is not working
body: <p>Following is working for inserting a new contact:</p>
  
  <pre><code>ArrayList&lt;ContentProviderOperation&gt; ops = new ArrayList&lt;ContentProviderOperation&gt;();
  
  ops.add(ContentProviderOperation.newInsert(ContactsContract.RawContacts.CONTENT_URI)
        .withValue(ContactsContract.RawContacts.ACCOUNT_TYPE, null)
        .withValue(ContactsContract.RawContacts.ACCOUNT_NAME, null)
        .build());
  
  ops.add(ContentProviderOperation.newInsert(Data.CONTENT_URI)
        .withValueBackReference(Data.RAW_CONTACT_ID, 0)
        .withValue(Data.MIMETYPE, StructuredName.CONTENT_ITEM_TYPE)
        .withValue(StructuredName.GIVEN_NAME, given_name)
        .build());
  
  getContentResolver().applyBatch(ContactsContract.AUTHORITY, ops);
  </code></pre>
  
  <p>I'd like to switch to <code>ContentValues</code> as it is more flexible. </p>
  
  <p>However, it fails when I change to <code>ContentValues</code> as follows:</p>
  
  <pre><code>ArrayList&lt;ContentProviderOperation&gt; ops = new ArrayList&lt;ContentProviderOperation&gt;();
  
  ops.add(ContentProviderOperation.newInsert(ContactsContract.RawContacts.CONTENT_URI)
        .withValue(ContactsContract.RawContacts.ACCOUNT_TYPE, null)
        .withValue(ContactsContract.RawContacts.ACCOUNT_NAME, null)
        .build());
  
  ContentValues values = new ContentValues();
  values.put(StructuredName.GIVEN_NAME, given_name)
  ops.add(ContentProviderOperation.newInsert(Data.CONTENT_URI)
        .withValues(values).build()); 
  
  getContentResolver().applyBatch(ContactsContract.AUTHORITY, ops);
  </code></pre>
  
  <p>This only adds an empty contact.</p>
  
  <p>Looks like I should call something like <code>withValueBackReference()</code> in my new version, but don't know how to do it. Any ideas?</p>