Unable to resolve contact name from number
<p>I'm using a Android Wildfire and I used the following code to lookup the contact name of an existing phone number.</p>

<pre><code>private String getContactNameFromNumber(String number) {
    String[] projection = new String[] { Contacts.Phones.DISPLAY_NAME, 
            Contacts.Phones.NUMBER };

    Uri contactUri = Uri.withAppendedPath(Contacts.Phones.CONTENT_FILTER_URL, Uri.encode(number));

    Log.d(TAG, contactUri.toString());

    // query time
    Cursor c = context.getContentResolver().query(contactUri, projection, null,
            null, null);

    // if the query returns 1 or more results
    // return the first result
    if (c.moveToFirst()) {
        String name = c.getString(c.getColumnIndex(Contacts.Phones.DISPLAY_NAME));
        Log.d(TAG, name);
        return name;
    }

    // return null if no match was found
    return null;
}
</code></pre>

<p>I am unable to resolve the contact name. I'm new to this topic any assistance will be appreciated. Many thanks in advance. The logcat output shows the following</p>

<pre><code>11-14 13:45:35.879: DEBUG/Test(3342): content://contacts/phones/filter/%2B919773653345
</code></pre>
