I'm building an App which relies heavily on the user's contacts.
I've created an Account
and create RawContacts
on behalf of this account when needed.
And I use SyncAdapter
and things are great.
But I'm still missing some parts of this puzzle:
I'm trying to implement a behavior similar to WhatsApp. Such that-
When a change happens in the name or phone of any contact - it would be sent to the server for evaluation.
Whether this contact was already in "my" RawContacts
, whether he was just created now by the user.
I know there's the ContentObserver
but tracking ContactsContract.Contacts.CONTENT_URI
seems like the wrong thing to do because it doesn't give the specific change, plus it gets raised to many times, and from to many events that don't interest me.
I know that WhatsApp are using SyncAdapter but I think they might be doing something more.
Any idea would be much appreciated.