Package javax.microedition.pim

Examples of javax.microedition.pim.Contact


             * @see net.rim.device.api.command.CommandHandler#execute(ReadOnlyCommandMetadata,
             *      Object)
             */
            public void execute(final ReadOnlyCommandMetadata metadata,
                    final Object context) {
                Contact c = null;
                boolean foundAddress = false;

                // Create a list of Contacts from the address book and search
                // list
                // for first occurrence of a valid address.
                try {
                    // Create list of Contacts
                    final ContactList contactList =
                            (ContactList) PIM.getInstance().openPIMList(
                                    PIM.CONTACT_LIST, PIM.READ_WRITE);
                    final Enumeration enumContact = contactList.items();

                    // 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) {
                                // Invoke maps application for current Contact
                                Invoke.invokeApplication(Invoke.APP_TYPE_MAPS,
View Full Code Here

TOP

Related Classes of javax.microedition.pim.Contact

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.