Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-18175] iOS: selectedPerson under showContacts does not show the details of the selected contact

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2014-12-10T22:35:07.000+0000
Affected Version/sn/a
Fix Version/sRelease 3.5.0, Release 4.0.0
ComponentsiOS
Labelsqe-3.5.0, regression
ReporterVisalakshi Chidambaram
AssigneeVishal Duggal
Created2014-12-10T10:28:06.000+0000
Updated2015-01-21T13:57:54.000+0000

Description

This is a regression as the alert message appears with titanium sdk 3.4.1 The alert message to display the fullname of the contact, set in the selectedPerson property of the showContacts, does not appear when a contact is selected from the device with titanium 3.5.0 sdk. When this test case is run using titanium 3.4.1 sdk, the alert messages appear but the information of the selected person, i.e. fullname of the person, does not appear instead an alert message showing "Fullname of Selected No name" pops up. Steps to reproduce: 1. Create a sample classic proj and replace app.js with the following:
var _window = Titanium.UI.createWindow({  
  //  title:'Tab 1',
    backgroundColor:'#fff'
});

    var btn = Ti.UI.createButton({
        title: 'contacts'
    });

    btn.addEventListener('click', function() {
        Ti.Contacts.showContacts({
            selectedPerson: function(e) {

                Ti.API.info('FullName of Selected' + e.person.fullName);
                alert('FullName of Selected ' + e.person.fullName);

            }
        });
    });
    _window.add(btn);
	_window.open();
2. Run the app 3. Click on contacts 4. Select any contacts Note: Please add contacts in contact list before running the testcase. Actual Results: 2. Window gets open with button "Contacts". 3. Contact list gets open. 4. No alert Expected results: 2. Window gets open with button "Contacts". 3. Contact list gets open. 4. Get an alert with "FullName of Selected [Fullname of contact]".

Comments

  1. Vishal Duggal 2014-12-10

    Pull pending master - https://github.com/appcelerator/titanium_mobile/pull/6468 3_5_X - https://github.com/appcelerator/titanium_mobile/pull/6469
  2. Ewan Harris 2014-12-11

    Verified fix on: Mac OSX 10.10.1 Appcelerator Studio, build: 3.4.1.201410281743 Titanium SDK build: 3.5.0.v20141211124115 Titanium CLI, build: 3.4.1 Alloy: 1.5.1 Xcode 6.1.1 iPhone 6 Plus (8.1), iPad Air 2 (8.2b2) Using the code below ran on both devices, when authorization is not required the following is printed to the console FullName of Selected No name, after requesting authorization the following is printed to the console FullName of Selected David Burrow.
       var _window = Titanium.UI.createWindow({backgroundColor:'#fff'});
        
       var btn = Ti.UI.createButton({
           title: 'contacts'
       });
        
       btn.addEventListener('click', function() {
       	Ti.Contacts.showContacts({
           	selectedPerson: function(e) {	
               	Ti.API.info('FullName of Selected ' + e.person.fullName);          
               }
           });
       });
       
       var b1 = Ti.UI.createButton({
       		bottom:10,
       		title:'Request Authorization'
       });
       
       b1.addEventListener('click',function(e){
       	Ti.Contacts.requestAuthorization(function(){Ti.API.info('Requesting');});
       }); 
       	    
       _window.add(b1); 
       _window.add(btn);
       _window.open();
       
    Closing ticket
  3. Keith Storm 2015-01-20

    This problem still exists for me using Android 4.3 on Motorola DROID RAZR with Titanium Mobile SDK 3.5.0 GA. Any way we can get a fix? Thanks.
  4. Eric Merriman 2015-01-20

    [~kstorm001] Hello, this ticket is specific to a filler of existing behavior on iOS. I just checked this code on Android and it is behaving as expected (the Alert appears with the name of the selected person displayed). I'm not sure what you're experiencing. I used emulator, but will ask our team to verify against devices. This code should display a contacts picker, then if you select a person you get an alert of the full name. Please let us know what you are seeing. If not exactly this ticket, please create a new one describing the behavior you are seeing, and what you expect.
  5. Ewan Harris 2015-01-20

    Using the code provided in the original ticket when building to a Note 2 (4.3) and Droid RAZR HD (4.0.4), the full name of a contact is returned. Using: Mac OSX 10.10.1 Appcelerator Studio, build: 3.4.1.201410281743 Titanium SDK build: 3.5.0.GA Titanium CLI, build: 3.4.1 Alloy: 1.5.1 Note 2 (4.3), Droid RAZR HD (4.0.4)
  6. Keith Storm 2015-01-21

    I will do some more testing to see if I can recreate the issue. Thanks!

JSON Source