Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-12315

Contacts Plugin returns same URL for all photos in array

    XMLWordPrintableJSON

    Details

      Description

      Example: Contact ID 1000 has three photos which are returned in an array in the contacts object. However, all three photo URL's are the same for each of the photos returned.

      <code>
      var options = new ContactFindOptions();
      options.filter = "";
      options.multiple = true;
      options.hasPhoneNumber = true;

      var fields = ["id", "photos"];

      navigator.contacts.find(fields, ContactListSuccess, ContactListError, options);

      function ContactListSuccess(contacts) {
      for (var i = 0; i < contacts.length; i++) {
      console.log(contacts[i].id);

      for (var j = 0; j < contacts[i].photos.length; j++)

      { console.log(j + " - " + contacts[i].photos[j].value); }

      }
      }

      function ContactListError(error) {
      console.error(error);
      }
      </code>

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              nocoded Joshua Rowe
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: