Wednesday, 27 November 2019

ContactsContract.DeletedContacts.CONTENT_URI does not show deleted contacts from some devices

Dear StackOverflow Community,

I am using a content observer to track changes in contacts, and depending on that i check added/updated contacts through ContactsContract.Contacts.CONTENT_URI with ContactsContract.Contacts.CONTACT_LAST_UPDATED_TIMESTAMP, and deleted contacts with ContactsContract.DeletedContacts.CONTENT_URI with ContactsContract.DeletedContacts.CONTACT_DELETED_TIMESTAMP.

Everything is working fine on my huawei device (Added, updated or deleted), but on samsung devices, the added and updated are getting catched and tracked but a problem existed with the delete.

The delete has 2 cases:

  • If the contact is deleted from multiple selection (main contacts page) it is being catched in content observer but not in the ContactsContract.DeletedContacts.CONTENT_URI query.

  • If the contact is deleted in the details of the contact page, it is being catched in content observer and in the ContactsContract.DeletedContacts.CONTENT_URI query.

The problem only occured with me (till now) on 2 samsung devices but not on a huawei device.

If someone had a similiar problem before, please advice.



from ContactsContract.DeletedContacts.CONTENT_URI does not show deleted contacts from some devices

No comments:

Post a Comment