[TIMOB-1001] Contact Picker
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T01:54:55.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.4.0 |
Components | Android |
Labels | android, contacts, defect, ios, iphone, phone, picker |
Reporter | ctredway |
Assignee | Don Thorp |
Created | 2011-04-15T02:41:13.000+0000 |
Updated | 2011-04-17T01:54:55.000+0000 |
Description
If any phone number other than the first one is clicked, the app crashes. code below.
Titanium.Contacts.showContactPicker({
success:function(event){
Ti.API.log(event);
//var phonenr=event.contact.phone[0].value; //This crashes if I
pick the not-first phone number for the contact. //var
org=event.contact.organization; //This crashes },
details:['firstName','lastName','phone','organization']
});
After some testing I do not see an index of which number was clicked. I think its only looking for the first number in the contacts info although when a number is clicked, you can get to all the numbers for that contact but you do not know which one was clicked.
This code is for the old contacts module. Contacts has been rewritten, I will attempt to rewrite the given example for the new framework and see if it works. Multivalue properties did not work at all in the old contacts code.
The following is the correct way to obtain property information from the contact picker. See the Contacts documentation.
(from [312e90a78aabe995241fda4530c5bf9cc582a98f]) Closes #1001: Documentation changes for Contacts. http://github.com/appcelerator/titanium_mobile/commit/312e90a78aabe995241fda4530c5bf9cc582a98f"> http://github.com/appcelerator/titanium_mobile/commit/312e90a78aabe...
instead of returning the email, can I return a specific Phone number?
phone is an array, and not sure how you would select an array item using your method.