add contact to a group in Android
<p>I am working on android apps. I want to add a contact in android phone group. The code I am using is below:</p>

<pre><code>    ContentValues values = new ContentValues();
                    values.put(ContactsContract.CommonDataKinds.GroupMembership.RAW_CONTACT_ID,personId);

    values.put(
        ContactsContract.CommonDataKinds.GroupMembership.GROUP_ROW_ID,GROUP_ID);

    values.put(
        ContactsContract.CommonDataKinds.GroupMembership.MIMETYPE,ContactsContract.CommonDataKinds.GroupMembership.CONTENT_ITEM_TYPE);

    Log.d("values :", ""+ values);

    this.getContentResolver().insert(   
                 ContactsContract.Data.CONTENT_URI, values);
</code></pre>

<p>Unfortunately, this is not working. Does anyone see anything obviously wrong with the above code?</p>
