I am using ContentObserver to listen for changes to the contacts database. now I realized that the onChange () method gets a random name, even if I haven't made any changes to the contacts. I suspect that this is somehow connected with the automatic synchronization of contacts (even if at the moment there are no real changes in the contacts).
is it possible to receive notifications only if there are real changes in the contacts made by the user?
thanks simon
public class ContactsObserver extends ContentObserver { private final static String TAG = ContactsObserver.class.getSimpleName(); private Context ctx; private List<ContactsChangeListener> listeners = new ArrayList<ContactsChangeListener>(); private ContactsObserver(Context ctx) { super(new Handler()); this.ctx = ctx.getApplicationContext(); ctx.getContentResolver() .registerContentObserver( ContactsContract.Contacts.CONTENT_URI,
source share