Help Creating a ContactsUtils class
<p>Alright, I would like to make a class that can kinda make working with Content Providers a little easier, especially while working with contacts. I have something of a base layout, but its erroring out when I try to initiate cr.  How would I be able to get something like this working?</p>

<p>Also, how does it look in general? From a design and efficiency perspective, as well as being an easy to use utility, would this be a good way to go about doing what I'd like to achieve?</p>

<pre><code>public class ContactUtils {
    private Uri uri = ContactsContract.Contacts.CONTENT_URI;
    private ContentResolver cr = new ContentResolver(this);
    public String getDisplayName(int id) {
        String name = null;
        String[] projection = new String[] {ContactsContract.Contacts.DISPLAY_NAME};
        String selection = ContactsContract.Contacts.IN_VISIBLE_GROUP + " = '" + ("1") + "'";
        Cursor contact = cr.query(this.uri, projection, selection, null, null);
        while (contact.moveToFirst()) {
            name = contact.getString(contact.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME));
        }
        return name;
    }
}
</code></pre>
