Package javax.microedition.pim

Examples of javax.microedition.pim.Contact.countValues()


        for (int i = 0; i < _invitees.size(); ++i) {
            try {
                final Contact c = (Contact) _invitees.elementAt(i);
                final String name = PIMDemo.getDisplayName(c);

                if (c.countValues(Contact.EMAIL) > 0) {
                    to[i] = new Address(c.getString(Contact.EMAIL, 0), name);
                }
            } catch (final AddressException e) {
                PIMDemo.errorDialog("Address(String, String) threw "
                        + e.toString());
View Full Code Here


            } else if (bodyPart instanceof PDAPContactAttachmentPart) {
                final Contact contact = (Contact) bodyPart.getContent();

                // Build the contact name
                final StringBuffer sb = new StringBuffer("Contact: ");
                if (contact.countValues(Contact.NAME) > 0) {
                    final String[] name =
                            contact.getStringArray(Contact.NAME, 0);

                    if (name[Contact.NAME_PREFIX] != null) {
                        sb.append(name[Contact.NAME_PREFIX]);
View Full Code Here

                    // Search for a valid address
                    while (enumContact.hasMoreElements() && !foundAddress) {
                        c = (Contact) enumContact.nextElement();

                        if (c.countValues(Contact.ADDR) > 0) {
                            final String address[] =
                                    c.getStringArray(Contact.ADDR, 0);

                            if (address[Contact.ADDR_LOCALITY] != null
                                    && address[Contact.ADDR_REGION] != null) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.