Package net.rim.blackberry.api.bbm.platform.profile

Examples of net.rim.blackberry.api.bbm.platform.profile.BBMPlatformContactList


                BBMPlatformUser user = (BBMPlatformUser) arg0;
                BBMPlatformContact contact = (BBMPlatformContact) user.getPresence();
                _connection.remove(contact);
            } else if(arg0 instanceof Scriptable) {
                BBMPlatformUser[] usersArray = Util.scriptableUsersArrayToUserArray((Scriptable) arg0);
                BBMPlatformContactList contactList = Util.userArrayToContactList(usersArray);
                _connection.remove(contactList);
            } else {
                throw new IllegalArgumentException("BBMPlatformUser or BBMPlatformUser[] must be provided");
            }
           
View Full Code Here


            return new Util.ScriptableUsersArray(users);
        }
    }
   
    public static BBMPlatformContactList userArrayToContactList(BBMPlatformUser[] users) {
        final BBMPlatformContactList contactList = new BBMPlatformContactList();
        for(int i = 0; i < users.length; i++) {
            BBMPlatformContact contact = (BBMPlatformContact) users[i].getPresence();
            contactList.add(contact);
        }
        return contactList;
    }
View Full Code Here

            }
        }

        public BBMPlatformContactList getContactsForGroup(int groupIndex) {
            if(groupIndex == 0) {
                final BBMPlatformContactList contacts = new BBMPlatformContactList();
                for(int i = 0; i < _users.length; i++) {
                    contacts.add(_users[i]);
                }
                return contacts;
            } else {
                return null;
            }
View Full Code Here

        }
    }
   
    private static Object getContactsWithApp() {
        final ContactListService contactService = BBMPlatformNamespace.getInstance().getContext().getContactListService();
        final BBMPlatformContactList contactList = contactService.getContactList();
        return Util.contactListToArray(contactList);
    }
View Full Code Here

           
            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) {
View Full Code Here

                });
            } else if(args.length >= 3) {
                final Scriptable users = (Scriptable) args[2];
               
                // Create contact list
                final BBMPlatformContactList contacts = new BBMPlatformContactList();
                final int numUsers = users.getElementCount();
                for(int i = 0; i < numUsers; i++) {
                    BBMPlatformUser user = (BBMPlatformUser) users.getElement(i);
                    contacts.add((BBMPlatformContact) user.getPresence());
                }
               
                _uiService.startBBMChat(contacts, message);
                Util.dispatchCallback(onComplete, null);
            }
View Full Code Here

TOP

Related Classes of net.rim.blackberry.api.bbm.platform.profile.BBMPlatformContactList

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.