开发者

How does deleting a contact work with a custom sync adapter in Android?

开发者 https://www.devze.com 2023-04-12 22:18 出处:网络
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

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:

  1. A user deletes the contact using the native Contacts app
  2. That contact gets marked for deletion and removed from my custom sync adapter (it no longer shows up in the Contacts app)
  3. 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号