Insert custom ringtone against a contact id
<p>I am trying to insert custom ringtone against a contact id using content provider. But I am failing to do  that. My code is given below:</p>

<pre><code>File f=new File(contact.getRingtone_file());
                Uri r=Uri.fromFile(f);

                ops.add(ContentProviderOperation
                        .newInsert(ContactsContract.Data.CONTENT_URI)
                        .withValueBackReference(ContactsContract.Data.RAW_CONTACT_ID,
                                rawContactInsertIndex)
                         .withValue(Data.MIMETYPE,
                                 ContactsContract.Contacts.CONTENT_ITEM_TYPE)
                            .withValue(Data.CUSTOM_RINGTONE,r)
                            .build());
</code></pre>

<p>Please help me if any one know the way to do the same.</p>
