Receive contact changes (added, deleted and modified)

Is there a timestamp for each contact?

I need to receive notification of a change (add, delete or change) to a contact. I implemented ContentObserver, but through this method I can receive a notification only if the change occurs on the contact, but I do not know what contact was changed! Any suggestions?

+5
source share
2 answers

I needed to do something like this. What I did is timestamp based synchronization. I track the last time a contact was updated using a field:

ContactsContract.Contacts.CONTACT_LAST_UPDATED_TIMESTAMP

- . , .

-, - , . .

0

.Raw

int DIRTY 

read/write , , VERSION , . "1" , , URI CALLER_IS_SYNCADAPTER. , : , ( CALLER_IS_SYNCADAPTER), DIRTY, .

. , - .

-1

All Articles