Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deleting contacts with same name #40

Closed
danijelzolic1 opened this issue Oct 8, 2019 · 2 comments
Closed

Deleting contacts with same name #40

danijelzolic1 opened this issue Oct 8, 2019 · 2 comments

Comments

@danijelzolic1
Copy link

danijelzolic1 commented Oct 8, 2019

Hi,

First of all, great plugin. Makes life easy.

My problem, on a One Plus running Android 9, is that if I have a contact ("John") that was created through the phone, I then create (ContactsService.addContact) a contact through the app with the exact same name ("John"), which results in a combined contact between these two. This is not so much of an issue and is probably just how the phone works. The issue is when I want to delete (ContactsService.deleteContact) the app-created contact through the app, it also deletes the old phone-created contact.

Not sure if the case is the on iOS.

So my question is, is there any solution to this?

I assume this is related to:
http://android-contact-id-vs-raw-contact-id.blogspot.com/

@lukasgit
Copy link
Owner

@danijelzolic1 thanks for the comment and question. Unfortunately, as you pointed out, it's related to the phone. There are hacks to differentiating contacts created with your app.

@danijelzolic1
Copy link
Author

Tanks for the response.

Yes, every device is different but, at least on Android, this is because of fetching the "CONTACT_ID" instead of "RAW_CONTACT_ID".
I did a local change in the library to use RAW_CONTACT_ID and now it only deletes the app-created contact.

Just wanted to put this here if other people stumble on this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants