How does deleting a contact work with a custom sync adapter in Android?
I wrote an app that uses a custom sync adapter for contacts, and it works perfectly for synching / adding / editing contacts. However, I can't figure out how t get my app (or the sync adapter service) to be notified when a contact was deleted on the local device. Here is the scenario now:
- A user deletes the contact using the native Contacts app
- That contact gets marked for deletion and removed from my custom sync adapter (it no longer shows up in the Contacts app)
- During the next sync, my sync adapter can see that the contact was marked for deletion, but there is no t开发者_开发知识库imestamp to know when this was done
I would like to have my app notified when the user deletes the contact in Step 1, and then immediately process that deletion. How can this be done?
Thanks.
精彩评论