Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-14243

Android: Ti.Contacts not reflecting complete information from system contacts

    Details

    • Sprint:
      2014 Sprint 09 Tooling, 2014 Sprint 11 SDK

      Description

      Hi,

      to reproduce the bug, first create a contact and add "organization", "url (www)" and some name etc.

      Important ist the organization and url

      run this code in an app.js

       
      // open a single window
      var win = Ti.UI.createWindow({
      	backgroundColor:'white'
      });
      var label = Ti.UI.createLabel();
      win.add(label);
      win.open();
       
      alert("running");
       
      var singleValue = [
        'recordId', 'firstName', 'middleName', 'lastName', 'fullName', 'prefix', 'suffix', 
        'nickname', 'firstPhonetic', 'middlePhonetic', 'lastPhonetic', 'organization', 
        'jobTitle', 'department', 'note', 'birthday', 'created', 'modified', 'kind'
      ];
      var multiValue = [
        'email', 'address', 'phone', 'instantMessage', 'relatedNames', 'date', 'url'
      ];
      var people = Ti.Contacts.getAllPeople();
      Ti.API.info('Total contacts: ' + people.length);
      for (var i=0, ilen=people.length; i<ilen; i++){
        Ti.API.info('---------------------');
        var person = people[i];
        for (var j=0, jlen=singleValue.length; j<jlen; j++){
          Ti.API.info(singleValue[j] + ': ' + person[singleValue[j]]);
        }
        for (var j=0, jlen=multiValue.length; j<jlen; j++){
          Ti.API.info(multiValue[j] + ': ' + JSON.stringify(person[multiValue[j]]));
        }
      }
      

      Response you get looks like this:

       
      06-08 03:25:05.075: I/TiAPI(1336):  ---------------------
      06-08 03:25:05.075: I/TiAPI(1336):  recordId: undefined
      06-08 03:25:05.075: I/TiAPI(1336):  firstName: undefined
      06-08 03:25:05.075: I/TiAPI(1336):  middleName: undefined
      06-08 03:25:05.075: I/TiAPI(1336):  lastName: undefined
      06-08 03:25:05.085: I/TiAPI(1336):  fullName: Bester Tester
      06-08 03:25:05.085: I/TiAPI(1336):  prefix: undefined
      06-08 03:25:05.085: I/TiAPI(1336):  suffix: undefined
      06-08 03:25:05.085: I/TiAPI(1336):  nickname: undefined
      06-08 03:25:05.085: I/TiAPI(1336):  firstPhonetic: undefined
      06-08 03:25:05.085: I/TiAPI(1336):  middlePhonetic: undefined
      06-08 03:25:05.085: I/TiAPI(1336):  lastPhonetic: undefined
      06-08 03:25:05.085: I/TiAPI(1336):  organization: undefined
      06-08 03:25:05.085: I/TiAPI(1336):  jobTitle: undefined
      06-08 03:25:05.085: I/TiAPI(1336):  department: undefined
      06-08 03:25:05.085: I/TiAPI(1336):  note: null
      06-08 03:25:05.085: I/TiAPI(1336):  birthday: null
      06-08 03:25:05.085: I/TiAPI(1336):  created: undefined
      06-08 03:25:05.085: I/TiAPI(1336):  modified: undefined
      06-08 03:25:05.085: I/TiAPI(1336):  kind: 1
      06-08 03:25:05.105: I/TiAPI(1336):  email: {}
      06-08 03:25:05.105: I/TiAPI(1336):  address: {}
      06-08 03:25:05.115: I/TiAPI(1336):  phone: {"mobile":["1 125-478"]}
      06-08 03:25:05.115: I/TiAPI(1336):  instantMessage: undefined
      06-08 03:25:05.115: I/TiAPI(1336):  relatedNames: undefined
      06-08 03:25:05.115: I/TiAPI(1336):  date: undefined
      06-08 03:25:05.115: I/TiAPI(1336):  url: undefined
      

      Even bigger problem ist, you dont get the first and lastname, but if you try to create a contact only with fullname, you get a contact without a name.

      Please fix it soon.

      <sdk-version>3.2.0.v20130522185622</sdk-version>

      But the same result on earlier builds

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                hpham Hieu Pham
                Reporter:
                fincha Alexander Frischbutter
                Reviewer:
                Vishal Duggal (Inactive)
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-16747
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Integration