How do I delete RawContacts that have a specific Organization.company data? #157
-
Awesome code by the way!!! Is there a way to delete a group based on the company name? I'm writing an app that pulls company contacts from an API and want to delete all that has a #CompanyName and then replace with the new information from the API. I have it creating just fine but getting to delete is somehow not working for me. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 24 replies
-
Thanks for the compliment 😁 Before I answer your question, I need to clarify something. Are you trying to delete a set of |
Beta Was this translation helpful? Give feedback.
-
To answer your question effectively, it would be useful for you to read the "Contacts Provider / ContactsContract Basic Concept" section in this how-to/guide; https://github.com/vestrel00/contacts-android/blob/main/howto/howto-learn-more-about-api-entities.md The rest of this answer assumes that you have a basic understanding of the one to many relationship between I'll breakdown this answer using my favorite problem and solution style. Please let me know if I formulated the problem incorrectly. The answer will be incorrect if the problem is not accurate 😄 ProblemGiven the following tables,
Write functions to...
These functions differ in behavior as will be discussed in the solution. Solution(1) Delete all
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
To answer your question effectively, it would be useful for you to read the "Contacts Provider / ContactsContract Basic Concept" section in this how-to/guide; https://github.com/vestrel00/contacts-android/blob/main/howto/howto-learn-more-about-api-entities.md
The rest of this answer assumes that you have a basic understanding of the one to many relationship between
Contacts
->RawContacts
->Data
.I'll breakdown this answer using my favorite problem and solution style. Please let me know if I formulated the problem incorrectly. The answer will be incorrect if the problem is not accurate 😄
Problem
Given the following tables,