Problem while reading contacts with ContactsContract.Contacts.CONTENT_URI
<p>I need to search a particular name from ma contacts... for that i gave the selection criteria like this </p>

<pre><code>ContactsContract.Contacts.DISPLAY_NAME + " LIKE '"+constraint+"%'"
</code></pre>

<p>But for apostrophe(')... means ...when i gave apostrophe as <strong>constraint</strong> an (<strong>SQL error</strong> )exception is thrown.. for all other special characters , the search is working..</p>

<p>How can we handle constraint <strong>apostrophe(')...</strong> in search criteria.. boz we can have contact names having <strong>apostrophe</strong> in it <strong>(Eg: Jennifer'lo'pe_z)</strong></p>
