[TIMOB-1949] Android: Person returned by showContacts always has null image (Android 2.0 and higher)
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Trivial |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T01:57:37.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.5.0 |
Components | Android |
Labels | android, defect, rplist |
Reporter | Bill Dawson |
Assignee | Bill Dawson |
Created | 2011-04-15T03:06:19.000+0000 |
Updated | 2011-04-17T01:57:37.000+0000 |
Description
Even if a person has an image (photo), if that person is
retrieved via the showContacts
API (the contacts
picker), its image
property will return null, as
opposed to a person retrieved via getAllPeople
, for
example. This occurs only on phones supporting the new contacts
api, so phones with 2.0 or higher.
Failcase app.js
Titanium.UI.setBackgroundColor('#000');
var w = Titanium.UI.createWindow({
title:'Test',
backgroundColor:'#fff'
});
var btn = Ti.UI.createButton({
title: 'Show Contacts Picker'
});
btn.addEventListener('click', function(){
Ti.Contacts.showContacts( {
selectedPerson: function(e) {
var img = e.person.image;
if (img === null) {
alert('Image is null');
} else {
alert('Image is not null');
}
}
})
});
w.add(btn);
w.open();
If you run that failcase and select a contact with a photo, it will still say "Image is null". Expected: "Image is not null."
(from [fc78d2977d6595b8d54dadac3a8b1024a3af43d9]) [#1949 state:fixed-in-qa] Correctly indicate if a person has a photo when that person is loaded directly from a cursor based on the people projection http://github.com/appcelerator/titanium_mobile/commit/fc78d2977d6595b8d54dadac3a8b1024a3af43d9"> http://github.com/appcelerator/titanium_mobile/commit/fc78d2977d659...
(from [901074850fdc4e2ee26a378936074271ce5c4970]) [#1949 state:fixed-in-qa] Correctly indicate if a person has a photo when that person is loaded directly from a cursor based on the people projection http://github.com/appcelerator/titanium_mobile/commit/901074850fdc4e2ee26a378936074271ce5c4970"> http://github.com/appcelerator/titanium_mobile/commit/901074850fdc4...
1.4.2.5935b3 G1 and 2.2sim