Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-17890] Android: Creating & saving contact does not add the contact to the phone's contact list

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2014-11-04T22:16:15.000+0000
Affected Version/sRelease 3.4.0, Release 3.4.1
Fix Version/sRelease 3.4.2, Release 3.5.0, Release 4.0.0
ComponentsAndroid
Labelsmodule_media, qe-3.4.1, qe-manualtest, qe-testadded, regression
ReporterLokesh Choudhary
AssigneeSunila
Created2014-10-23T18:44:34.000+0000
Updated2014-11-24T19:38:22.000+0000

Description

This regression is seen from 3.4.0.GA and above. It works as expected in 3.3.0.GA.

Description:

1. Create a default classic app & replace the app/js with the following code:
var photo = Ti.UI.createImageView({
    image: 'KS_nav_views.png'
}).toBlob();
 
var person = Ti.Contacts.createPerson({
  firstName: 'Aaron',
  lastName: 'Smith',
  date: {
    anniversary: ['2002-11-11T11:23:30.000+0000'],
    other: ['2011-04-02T12:00:00.000+0000']
  }
}); 
 
 
person.organization = "google";
person.phone = {
    mobile: ['9999999991', '1234556677'],
    work: ['9999998888', '1234567789']
  };
person.address = {
    work:[
      {
        Street: '900 West Drive',
        City: 'New York',
        County: 'Berkshire',
        Country: 'U.S.A',
        ZIP: '99999'
      },
      {
        Street: '456 New Ave.',
        City: 'San Jose',
        State: 'California',
        Country: 'U.S.A',
        ZIP: '94082'
      }
    ],
    home:[
      {
        Street: '2 East Drive',
        City: 'Las Vegas',
        State: 'Nevada',
        Country: 'U.S.A',
        ZIP: '55555'
      }
    ]};
person.instantMessage = {
    home:[
      {
        service: 'AIM',
        username: 'Dominator'
      },
      {
        service: 'MSN',
        username: 'dominator@msn.com'
      }
    ],
    work:[
      {
        service: 'Facebook',
        username: 'Dominator2'
      }
    ]
};
person.url = {
    homepage: ['www.myspace.com'],
    work: ['www.apple.com', 'www.yahoo.com']
};
person.email = {
    home: ['hieu@google.com'],
    work: ['pham@google.com', 'hp007@appcelerator.com']
};
person.relatedNames = {
    parent: ['daddy', 'mommy'],
    assistant: ['mayhem']
};
person.date = {
    anniversary: ['2022-11-11T11:23:30.000+0000'],
    other: ['2003-04-02T12:00:00.000+0000']
};
person.firstName = "Ade";
person.lastName = "Crude";
person.birthday = "1999-01-01T12:00:00.000+0000";
person.organization = "GOOGLE";
person.note = "NOTE: MASS EFFECT";
person.nickname = "NICKNAME: THOR";
person.image = photo;
Ti.Contacts.save([person]);
2. Build & run the app on android device. 3. Open contacts on the device & check if you have a new contact Ade Crude" added.

Actual Result:

1.A new contact "Ade Crude" is not added to the contacts list on the device.

Expected Result:

1.A new contact "Ade Crude" is added to the contact list on the device

Comments

  1. Ingo Muschenetz 2014-10-23

    To confirm, this works on Android 5.0 with 3.3.0.GA, and fails on Android 5.0 with 3.4.0.GA? Is there a reason this is not labelled a regression?
  2. Lokesh Choudhary 2014-10-23

    This issue is not limited to android 5.0. It's also seen on an android 4.4.2 device. Yes, this is a regression which got introduced in 3.4.0.GA as 3.3.0.GA does not have this issue.
  3. Sunila 2014-10-30

    Forgot to assign the bug to me but I was looking into this. Here is the PR https://github.com/appcelerator/titanium_mobile/pull/6290
  4. Sunila 2014-11-02

    https://github.com/appcelerator/titanium_mobile/pull/6290
  5. Ping Wang 2014-11-05

    3_4_X PR: https://github.com/appcelerator/titanium_mobile/pull/6314
  6. Lokesh Choudhary 2014-11-24

    Verified the fix. The contact is successfully created on the device.\ Closing. Environment: Appc Studio : 3.4.1.201410281743 Ti SDK : 3.5.0.v20141124092514, 3.4.2.v20141117130125 CLI : 3.4.1 Alloy : 1.5.1 GA Code Processor : 1.1.1 MAC Yosemite : 10.10 Nexus 5 - Android 5.0

JSON Source