cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jesse MacFadyen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-12315) Contacts Plugin returns same URL for all photos in array
Date Fri, 03 Mar 2017 18:33:45 GMT

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

Jesse MacFadyen commented on CB-12315:
--------------------------------------

I think the safest way forward is just to update the docs, to reflect the way it works on
android.
I was able to create a contact with more than one image, by merging 2 with separate images,
but still I could not find a way to access the second image.  Personally, I don't think this
issue is critical enough to warrant the heroic effort it would take to fix it.

> Contacts Plugin returns same URL for all photos in array
> --------------------------------------------------------
>
>                 Key: CB-12315
>                 URL: https://issues.apache.org/jira/browse/CB-12315
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin Contacts
>    Affects Versions: 6.4.0
>            Reporter: Joshua Rowe
>            Assignee: Jesse MacFadyen
>              Labels: android6.0, triaged
>             Fix For: 6.4.0
>
>
> 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>



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message