Advertisement

07.11.2008 at 04:18AM PDT, ID: 23556776
[x]
Attachment Details

Doesn't properly work JSR75 on samsung phones (for example, phones Samsung E480 or E250)

Asked by eztalk in Java 2 Micro-Edition (J2ME), Cellular Phones & Carriers

Tags: Samsung, Mobile phone, E480 or E250, JSR75 in Java ME program, Java ME

We have problem programming on Java ME for samsung phones. When we try to read contacts with PIM API (JSR 75).
Code example:

import javax.microedition.pim.Contact;
import javax.microedition.pim.ContactList;
import javax.microedition.pim.PIM;

public class PimReader {
      
      public Vector getPhoneBook() {
            
            ContactList contactLists = null;
            Enumeration contactEnums = null;
                                    
            try {
                  contactLists = (ContactList)PIM.getInstance().openPIMList(PIM.CONTACT_LIST, PIM.READ_ONLY);
                  if (contactLists != null && contactLists.isSupportedField(Contact.TEL)) {
                        contactEnums = contactLists.items();
                  }
            } catch (Exception e) {
                  System.err.println("Exception in PIMReader " + e);
                  return null;
            }

----------------------------------
Then contactEnums is not null but it's empty. contactEnums.hasMoreElements() returns false on first call. On another phones this code works properly. Can we fixed this problem or get contacts another way? Thank you.Start Free Trial
[+][-]07.11.2008 at 05:22AM PDT, ID: 21981639

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Java 2 Micro-Edition (J2ME), Cellular Phones & Carriers
Tags: Samsung, Mobile phone, E480 or E250, JSR75 in Java ME program, Java ME
Sign Up Now!
Solution Provided By: MicheleMarcon
Participating Experts: 1
Solution Grade: B
 
 
[+][-]07.11.2008 at 05:27AM PDT, ID: 21981672

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628