cordova-plugin-contacts icon indicating copy to clipboard operation
cordova-plugin-contacts copied to clipboard

How to update existing contacts

Open landry161 opened this issue 6 years ago • 5 comments

Someone can help me. How to update an existing contacts ?

landry161 avatar Sep 02 '18 18:09 landry161

find first, then make your changes and then save on the Contact: https://github.com/apache/cordova-plugin-contacts#methods-1

janpio avatar Sep 02 '18 19:09 janpio

find first, then make your changes and then save on the Contact: https://github.com/apache/cordova-plugin-contacts#methods-1

This is not correct. Save will only update things like name/notes etc. If you for example want to add phoneNumber, Email, Addresses etc, this apparently will not work with save() unless you clone first but than information which is not cloned can be lost.

Bramzor avatar Oct 06 '18 01:10 Bramzor

this apparently will not work with save() unless you clone first but than information which is not cloned can be lost.

Huh what?

janpio avatar Oct 30 '18 14:10 janpio

On iOS (havent tested Android) there is a bug that does not allow to save any information which is of the type array. The only currently working way is to clone the contacts, remove the contact and save it as a new one. But when doing this, items that are not parsed (so items that will not be cloned) will be lost during the creation of the cloned contact.

Bramzor avatar Oct 30 '18 14:10 Bramzor

Please open an issue for that or update https://github.com/apache/cordova-plugin-contacts/issues/174 to also mention this if it is related.

janpio avatar Oct 30 '18 14:10 janpio

We are archiving this repository following Apache Cordova's Deprecation Policy. We will not continue to work on this repository. Therefore all issues and pull requests are being closed. Thanks for your contribution.

timbru31 avatar Jan 09 '23 07:01 timbru31