Trying to add a value into the Contact
<p>I have this code:</p>

<pre><code>String cName = name.getText().toString();
String cPhone = phone.getText().toString();
String cMail = email.getText().toString();
int cPhoneType = mContactPhoneTypes.get(mContactPhoneTypeSpinner.getSelectedItemPosition());
int cEmailType = mContactEmailTypes.get(mContactEmailTypeSpinner.getSelectedItemPosition());

ArrayList&lt;ContentProviderOperation&gt; ops = new ArrayList&lt;ContentProviderOperation&gt;();
int rowContactInsertIndex = ops.size();

ops.add(ContentProviderOperation.newInsert(ContactsContract.RawContacts.CONTENT_URI).withValue(ContactsContract.RawContacts.ACCOUNT_TYPE, mSelectedAccount.getType()).withValue(ContactsContract.RawContacts.ACCOUNT_NAME, mSelectedAccount.getName()).build());  
ops.add(ContentProviderOperation.newInsert(ContactsContract.RawContacts.CONTENT_URI).withValueBackReference(ContactsContract.Data.RAW_CONTACT_ID, rowContactInsertIndex).withValue(ContactsContract.Data.DATA1,ContactsContract.CommonDataKinds.StructuredName.CONTENT_ITEM_TYPE).withValue(ContactsContract.CommonDataKinds.StructuredName.DISPLAY_NAME,cName).build());
ops.add(ContentProviderOperation.newInsert(ContactsContract.RawContacts.CONTENT_URI).withValueBackReference(ContactsContract.Data.RAW_CONTACT_ID, rowContactInsertIndex).withValue(ContactsContract.Data.DATA1, ContactsContract.CommonDataKinds.Phone.CONTENT_ITEM_TYPE).withValue(ContactsContract.CommonDataKinds.Phone.NUMBER, cPhone).withValue(ContactsContract.CommonDataKinds.Phone.TYPE, cPhoneType).build());
ops.add(ContentProviderOperation.newInsert(ContactsContract.RawContacts.CONTENT_URI).withValueBackReference(ContactsContract.Data.RAW_CONTACT_ID, rowContactInsertIndex).withValue(ContactsContract.Data.DATA1, ContactsContract.CommonDataKinds.Email.CONTENT_ITEM_TYPE).withValue(ContactsContract.CommonDataKinds.Email.DATA, cMail).withValue(ContactsContract.CommonDataKinds.Email.TYPE, cEmailType).build());

try {
    ContentProviderResult[] res =  getContentResolver().applyBatch(ContactsContract.AUTHORITY, ops);
} catch(Exception e) {
    Context context = getApplicationContext();
    CharSequence txt = getString(R.string.contactCreationFailure);
    Toast.makeText(context, txt, Toast.LENGTH_LONG).show();
}
</code></pre>

<p>But I'm getting the following error:</p>

<pre>android.database.sqlite.SQLiteException: table raw_contacts has no column named data1: , while compiling: INSERT INTO raw_contacts(contact_id, data1, raw_contact_id) VALUES(?, ?, ?);</pre>

<p>Any ideas? Thanks in advance.</p>
