UiApplication.getUiApplication().invokeLater(new Runnable() {
public void run() {
Object pickedUsersArray;
try {
BBMPlatformContactList pickedUsersList;
if(users.equals(UNDEFINED)) { // users not provided, use type
try {
pickedUsersList = _uiService.showContactPicker(title, groupTypeInt, multiSelect, showSelectAll);
} catch(Exception e) {
Util.logError("UIService#showContactPicker(String, int, boolean, boolean) threw " + e);
pickedUsersList = new BBMPlatformContactList();
}
} else if(type.equals(UNDEFINED)) { // type not provided, use users
try {
pickedUsersList = _uiService.showContactPicker(title, userList, multiSelect, showSelectAll);
} catch(Exception e) {
Util.logError("UIService#showContactPicker(String, ContactListProvider, boolean, boolean) threw " + e);
pickedUsersList = new BBMPlatformContactList();
}
} else { // both users and type provided, use both
try {
pickedUsersList = _uiService.showContactPicker(title, userList, groupTypeInt, multiSelect, showSelectAll);
} catch(Exception e) {
Util.logError("UIService#showContactPicker(String, ContactListProvider, int, boolean, boolean) threw " + e);
pickedUsersList = new BBMPlatformContactList();
}
}
pickedUsersArray = Util.contactListToArray(pickedUsersList);
} catch(Exception e) {