private String getContactNameByPhoneNumber(String address) { Uri uri = Uri.withAppendedPath(ContactsContract.PhoneLookup.CONTENT_FILTER_URI, Uri.encode(address)); Cursor cs= this.getContentResolver().query(uri, new String[]{ContactsContract.PhoneLookup.DISPLAY_NAME}, ContactsContract.PhoneLookup.NUMBER + "='" + address + "'", null, null); String name = ""; if(cs.getCount()>0) { cs.moveToFirst(); name=cs.getString(cs.getColumnIndex(ContactsContract.PhoneLookup.DISPLAY_NAME)); } cs.close(); return name; }