Following is from Android Documentation
You can acquire a lookup key from the contact itself, it is a column on the ContactsContract.Contacts table.
Uri lookupUri = Uri.withAppendedPath(Contacts.CONTENT_LOOKUP_URI, lookupKey)
Cursor c = getContentResolver().query(lookupUri, new String[]{Contacts.DISPLAY_NAME}, ...);
try {
c.moveToFirst();
String displayName = c.getString(0);
} finally {
c.close();
}
but couldn't get it to work.
I visited answers on Stackoverflow here and here but in vein.
Any help will be highly appreciated.