[ 
https://issues.apache.org/jira/browse/CB-11041?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15231366#comment-15231366
 ] 

ASF GitHub Bot commented on CB-11041:
-------------------------------------

Github user sarangan12 commented on a diff in the pull request:

    
https://github.com/apache/cordova-plugin-contacts/pull/119#discussion_r58964196
  
    --- Diff: README.md ---
    @@ -354,6 +354,35 @@ for details.
         // remove the contact from the device
         contact.remove(onSuccess,onError);
     
    +### Removing phone number(s) from a saved contact
    +
    +    var myContact = navigator.contacts.create({"displayName": "Test 
User"});
    +    var phoneNumbers = [];
    +
    +    phoneNumbers[0] = new ContactField('work', '768-555-1234', false);
    +    phoneNumbers[1] = new ContactField('mobile', '999-555-5432', true); // 
preferred number
    +    phoneNumbers[2] = new ContactField('home', '203-555-7890', false);
    +
    +    myContact.phoneNumbers = phoneNumbers;
    +    myContact.save(function (contact_obj) {
    +        var contactObjToModify = contact_obj.clone();
    +        contact_obj.remove(function(){
    +            // Note: Do NOT use delete operator. It will break in android.
    +            // delete contactObjToModify.phoneNumbers[1];
    --- End diff --
    
    Done


> cordova-plugin-contacts readme must be updated to include instructions on 
> removing phone number from a contact
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: CB-11041
>                 URL: https://issues.apache.org/jira/browse/CB-11041
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin Contacts
>            Reporter: Sarangan Rajamanickam
>            Assignee: Sarangan Rajamanickam
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to