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

Contact.find does not return urls

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.7.0
    • 1.8.0
    • cordova-android
    • None

    Description

      I just hit a wall. I have Android project that heavily relies on
      contact api (synchronization of all fields with phone's addressbook).

      It seems that I can't get any urls.

      I have something like this:

      Contacts:
      1.
      Name: Aaaaaaaaa
      Surname: Rrrrgh
      email: fmc@fmc.fmc
      a photo,
      url: http://example.pl, fmc://fmc.fmc
      2.
      Name: Mmmm
      url: http://example.pl

      The code:
      navigator.contacts.find(
      ['*'],
      function(deviceContacts) {
      console.log(App.Utils.dump(deviceContacts,5));
      });

      This produces object dump as follows:

      I/Web Console( 536): '0' ...
      I/Web Console( 536): 'id' => "1"
      I/Web Console( 536): 'rawId' => "1"
      I/Web Console( 536): 'displayName' => "Aaaaaaaaa Rrrrgh"
      I/Web Console( 536): 'name' ...
      I/Web Console( 536): 'middleName' => ""
      I/Web Console( 536): 'familyName' => "Rrrrgh"
      I/Web Console( 536): 'formatted' => " Aaaaaaaaa Rrrrgh
      "
      I/Web Console( 536): 'givenName' => "Aaaaaaaaa"
      I/Web Console( 536): 'honorificSuffix' => ""
      I/Web Console( 536): 'honorificPrefix' => ""
      I/Web Console( 536): 'nickname' ...
      I/Web Console( 536): 'phoneNumbers' ...
      I/Web Console( 536): 'emails' ...
      I/Web Console( 536): '0' ...
      I/Web Console( 536): 'type' => "home"
      I/Web Console( 536): 'value' => "fmc@fmc.fmc"
      I/Web Console( 536): 'id' => "5"
      I/Web Console( 536): 'pref' => "false"
      I/Web Console( 536): 'addresses' ...
      I/Web Console( 536): 'ims' ...
      I/Web Console( 536): 'organizations' ...
      I/Web Console( 536): 'birthday' ...
      I/Web Console( 536): 'note' ...
      I/Web Console( 536): 'photos' ...
      I/Web Console( 536): '0' ...
      I/Web Console( 536): 'value' => "content://
      com.android.contacts/contacts/1/photo"
      I/Web Console( 536): 'type' => "url"
      I/Web Console( 536): 'id' => "1"
      I/Web Console( 536): 'pref' => "false"
      I/Web Console( 536): 'categories' ...
      I/Web Console( 536): 'urls' ...
      I/Web Console( 536): 'remove' => "function (successCB,
      errorCB) {
      (...)
      I/Web Console( 536): '1' ...
      I/Web Console( 536): 'id' => "2"
      I/Web Console( 536): 'rawId' => "2"
      I/Web Console( 536): 'displayName' => "Mmmm"
      I/Web Console( 536): 'name' ...
      I/Web Console( 536): 'formatted' => "Mmmm "
      I/Web Console( 536): 'givenName' => "Mmmm"
      I/Web Console( 536): 'nickname' ...
      I/Web Console( 536): 'phoneNumbers' ...
      I/Web Console( 536): 'emails' ...
      I/Web Console( 536): 'addresses' ...
      I/Web Console( 536): 'ims' ...
      I/Web Console( 536): 'organizations' ...
      I/Web Console( 536): 'birthday' ...
      I/Web Console( 536): 'note' ...
      I/Web Console( 536): 'photos' ...
      I/Web Console( 536): 'categories' ...
      I/Web Console( 536): 'urls' ...
      and nothing here!

      Am I doing something wrong or this is a nasty bug?

      regards,
      Marek

      Attachments

        Activity

          People

            macdonst Simon MacDonald
            macdonst Simon MacDonald
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: