{ "id": "119384", "key": "TIMOB-15104", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "2", "description": "The problem described is an issue which will never be fixed.", "name": "Won't Fix" }, "resolutiondate": "2015-01-19T22:04:34.000+0000", "created": "2013-09-03T13:51:37.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "android", "exalture", "showcontacts" ], "versions": [ { "id": "15479", "description": "Release 3.1.2", "name": "Release 3.1.2", "archived": true, "released": true, "releaseDate": "2013-07-31" } ], "issuelinks": [], "assignee": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-22T21:33:46.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "The {{showContactsParams.selectedProperty}} callback never gets called. Only the {{showContactsParams.selectedPerson}} does.\r\n\r\nh1. Steps to reproduce:\r\n\r\n# Run the following app:\r\n {code}\r\n var w = Ti.UI.createWindow({backgroundColor:'white'});\r\n var b = Ti.UI.createButton({title:'Select'});\r\n b.addEventListener('click', function () {\r\n Ti.Contacts.showContacts({\r\n selectedProperty: function (e) {\r\n Ti.API.debug('called');\r\n }\r\n });\r\n });\r\n w.add(b);\r\n w.open();\r\n {code}\r\n# In the console you won't see {{called}}\r\n# Replace {{selectedProperty}} by {{selectedPerson}} and run again\r\n# This time you *will* see {{called}}", "attachment": [], "flagged": false, "summary": "Android: Add support for showContactsParams.selectedProperty", "creator": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "subtasks": [], "reporter": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "environment": "SDK/CLI 3.1.2.GA\r\nAndroid 4.1.2 on Samsung Galaxy S2", "closedSprints": [ { "id": 291, "state": "closed", "name": "2015 Sprint 01 SDK", "startDate": "2015-01-03T01:00:00.000Z", "endDate": "2015-01-17T01:00:00.000Z", "completeDate": "2015-01-19T17:24:40.828Z", "originBoardId": 114 }, { "id": 309, "state": "closed", "name": "2015 Sprint 02 SDK", "startDate": "2015-01-17T01:00:16.697Z", "endDate": "2015-01-31T01:00:00.000Z", "completeDate": "2015-02-02T14:36:09.696Z", "originBoardId": 114 }, { "id": 272, "state": "closed", "name": "2014 Sprint 25 SDK", "startDate": "2014-12-08T22:49:31.264Z", "endDate": "2014-12-22T01:00:00.000Z", "completeDate": "2015-01-05T18:18:28.523Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "290610", "author": { "name": "thomas.neerup@eg.dk", "key": "thomas.neerup@eg.dk", "displayName": "Thomas Neerup", "active": true, "timeZone": "Europe/Copenhagen" }, "body": "Is there any updates on this one ? \r\nThe Contacts module is useless on android with this bug:(", "updateAuthor": { "name": "thomas.neerup@eg.dk", "key": "thomas.neerup@eg.dk", "displayName": "Thomas Neerup", "active": true, "timeZone": "Europe/Copenhagen" }, "created": "2014-01-31T11:48:26.000+0000", "updated": "2014-01-31T11:48:26.000+0000" }, { "id": "318750", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "3.4.0 is moved forward, and 3.5.0 is taking its place in the calendar.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-08-14T21:31:58.000+0000", "updated": "2014-08-14T21:31:58.000+0000" }, { "id": "333087", "author": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "body": "I don't see anyway to get a callback in Android when a contact property is selected.", "updateAuthor": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2014-11-20T17:25:16.000+0000", "updated": "2014-11-20T17:25:16.000+0000" }, { "id": "333759", "author": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This is not so much a bug, as it is an unimplemented feature (and a doc bug).\r\nUpdating the docs to show that selectedProperty is iOS only.\r\nPR: https://github.com/appcelerator/titanium_mobile/pull/6401\r\n\r\nWe should return to this with a little more time to investigate adding this feature.", "updateAuthor": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-11-25T23:14:41.000+0000", "updated": "2014-11-25T23:15:53.000+0000" }, { "id": "334096", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "The current implementation for this in Android devices uses the intent to call the Android's contact activity that allows a user to select a contact's Name (a Person). This will actually return all the Person's information available.\r\n\r\nNo other property is shown. Hence there is no \"selectedProperty\" callback. \r\n\r\nIf you still want a selectedProperty for Android, here's one way:\r\n{code}\r\nvar w = Ti.UI.createWindow({backgroundColor:'white'});\r\nvar b = Ti.UI.createButton({title:'Select'});\r\n\r\nb.addEventListener('click', function () {\r\n Ti.Contacts.showContacts({\r\n selectedPerson: function (e) {\r\n Ti.API.info('Person:'+e.person.getFullName()); \r\n \tvar phoneNumbers = e.person.getPhone();\r\n \t// Handle the various properties. In this example phone numbers can be iterated through\r\n\t\tfor (var phoneType in phoneNumbers) {\r\n\t\t Ti.API.info(phoneType+\"=\"+phoneNumbers[phoneType]);\r\n\t\t}\r\n }\r\n });\r\n});\r\nw.add(b);\r\nw.open();\r\n{code}\r\n\r\nIn this example, I iterated through the phone numbers. You can instead open a new window with the Person's selected details and allow a person to select the various properties available.", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2014-12-01T07:12:14.000+0000", "updated": "2014-12-01T07:13:06.000+0000" }, { "id": "338417", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "When we show all contacts via .showContacts, there are no properties that is displayed on Android. You pick a person and it returns, so 'selectedProperty' is not relevant. On iOS, if you click on a contact, it then show all the available properties for you to select. This isn't the case for Android.\r\n\r\n", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-01-08T21:15:29.000+0000", "updated": "2015-01-08T21:16:13.000+0000" }, { "id": "415012", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as \"Won't Fix\".", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-22T21:33:46.000+0000", "updated": "2017-03-22T21:33:46.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }