No there is no way to get which contact had changed
c&p from my response related with this topic here
I have this code in my Application base class.
private ContentObserver contactObserver = new ContactObserver();
private class ContactObserver extends ContentObserver {
public ContactObserver() {
super(null);
}
@Override
public void onChange(boolean selfChange) {
super.onChange(selfChange);
// Since onChange do not sent which user have been changed, you
// have to figure out how to match it with your data.
// Note: Contact is one of my classes.
for (Contact contact : getContacts()) {
if (!contact.isLinked())
continue;
String selection = ContactsContract.Data._ID + " = ?";
String[] selectionArgs = new String[] { contact.getSystemId() };
String[] projection = new String[] { ContactsContract.Data.DISPLAY_NAME };
Cursor cursor = getContentResolver().query(
ContactsContract.Contacts.CONTENT_URI, projection,
selection, selectionArgs, null);
if (!cursor.moveToFirst())
return;
String name = cursor.getString(0);
if (contact.getUsername().equalsIgnoreCase(name))
continue;
contact.setUserName(name);
}
}
}
Regarding about what you can put in projection check here
Hope this helps