Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

Unable to read General number of a native Phonebook contact in Series 40 (Known Issue)

From Wiki
Jump to: navigation, search
Article Metadata



FileConnection and PIM API (JSR-75) cannot read the General number of an inserted native Phonebook contact in Series 40.


The FileConnection and PIM API (JSR-75) can be used for reading from and writing to contacts of the native Phonebook application. However, if the user inserts the General phone number field to a Phonebook contact using the native Phonebook in Series 40, the FileConnection and PIM API cannot read the inserted General phone number field. All the other phone number fields can be read without problems.

How to reproduce

The described problem can be reproduced as follows:

  1. By using a Series 40 device, browse for the native Phonebook application('Menu' -> 'Contacts').
  2. Insert a new contact to the native Phonebook application.
  3. Insert General phone number field for the new contact ('Options' -> 'Add detail' -> 'Number' -> 'General') and insert a number into the field.
  4. Insert other phone number fields ('Mobile', 'Home', etc.) for the new contact.
  5. Implement the test MIDlet using the following code:
     import java.util.Enumeration;
    import javax.microedition.midlet.MIDlet;
    import javax.microedition.lcdui.*;
    import javax.microedition.pim.*;
    public class ContactGeneralNumber extends MIDlet implements CommandListener {
    private Form f;
    private Display d;
    private Command exitCmd;
    private Command searchCmd;
    public ContactGeneralNumber() {
    f = new Form("Phone number read test");
    // Adding command buttons
    searchCmd = new Command("Search", Command.OK, 0);
    exitCmd = new Command("Exit", Command.EXIT, 1);
    d = d.getDisplay(this);
    public void commandAction(Command cmd, Displayable dable) {
    if (cmd == exitCmd) {
    } else if (cmd == searchCmd) {
    try {
    } catch (PIMException ex) {
    f.append("Error: " +ex.toString());
    /* Search the added contact, count its phone number fields, access all the
    fields, and put their content visible on the Form. */

    private void searchContact() throws PIMException {
    PIM pim = PIM.getInstance();
    PIMList list = pim.openPIMList(PIM.CONTACT_LIST, PIM.READ_ONLY);
    Enumeration en = list.items();
    while (en.hasMoreElements()) {
    Contact contact = (Contact) en.nextElement();
    int count = contact.countValues(Contact.TEL);
    for (int index = 0; index < count; index++) {
    f.append("" + index + " :");
    String value = contact.getString(Contact.TEL, index);
    f.append("" + value + "\n");
    public void startApp() {
    public void pauseApp() {
    public void destroyApp(boolean unconditional) {
  6. Install and launch the test MIDlet and press 'Search'. The MIDlet returns data for all the other fields but not for the General phone number field.


No solution exists.

This page was last modified on 26 July 2013, at 06:35.
34 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.