×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Oct 2003
    Posts
    24

    Unhappy (FileConnection) Share apps between 6600 and 6630

    hi, i need to write one application that in nokia 6630 read on filesystem for images, while in 6600 read into jar
    (6630 has FileConnection and PIM API)

    If i use this code, my apps doenst starts in 6600 while in 6630 works well:

    public void run() {
    try
    {
    if (System.getProperty("microedition.io.file.FileConnection.version" )!=null) {
    String link = "file:///Memory Card/00003OUT.png";
    FileConnection fc = (FileConnection) Connector.open(link);
    if (fc.exists()){
    InputStream is = fc.openInputStream();
    Image image = Image.createImage(is);
    is.close();
    frmImage.append(image);
    }
    fc.close();
    } else
    {
    try {
    Image im = Image.createImage("/00003IN.PNG");
    frmImage.append(im);
    } catch (IOException e) {
    frmImage.append(e.toString());
    }
    }
    }catch (Exception e){
    frmImage.append("file: "+link+"exx: "+e);
    }
    }


    In the code above, if i delete line
    "FileConnection fc = (FileConnection) Connector.open(link);"
    the app runs on 6600.
    the problem is the cast "(FileConnection)"
    if i do:
    "FileConnection fc = null;"
    "Connection cn = Connector.open(link);"
    the app works again in 6600..

    but i need the same app work in 6600 and 6630

    is possible?

    Thanks
    Matteo

  2. #2
    Super Contributor
    Join Date
    Apr 2003
    Location
    USA, CA
    Posts
    7,191

    Re: (FileConnection) Share apps between 6600 and 6630

    Stupid question: Why don't you use image files in the JAR file for both devices?

    Hartti

  3. #3
    Super Contributor
    Join Date
    Mar 2006
    Posts
    516

    Re: (FileConnection) Share apps between 6600 and 6630

    Hi matte,

    R u getting a compilation error???It will not occur if u compile ur application with MIDP2.0 api for 6600 app as well. Then it should work. since AFAIK System.getProperty("microedition.io.file.FileConnection.version") will return null for 6600.

    Wang

  4. #4
    Registered User
    Join Date
    Oct 2003
    Posts
    24

    Re: (FileConnection) Share apps between 6600 and 6630

    i have no compilation error,
    i compile using midp2.0 and cldc1.0 (for 6600)

    the app is installed well (in 6600 and 6630) but when i try to start it, in 6600 nothing happens while in 6630 works...

Similar Threads

  1. Replies: 1
    Last Post: 2006-06-12, 15:39
  2. Help : Unable run more than one JAVA Apps on N80, 6680, 6681 ... 6630
    By lionel_lhf in forum Mobile Java Tools & SDKs
    Replies: 0
    Last Post: 2006-06-09, 04:03
  3. Help : Unable run more than one JAVA Apps on N80, 6680, 6681 ... 6630
    By lionel_lhf in forum News and Announcements
    Replies: 0
    Last Post: 2006-06-09, 04:01
  4. Help : Unable run more than one JAVA Apps on N80, 6680, 6681 ... 6630
    By lionel_lhf in forum Feedback - Nokia Developer Services & Infrastructure
    Replies: 0
    Last Post: 2006-06-09, 04:00
  5. JVM between 6630 and 6600
    By scheung3 in forum Mobile Java General
    Replies: 1
    Last Post: 2005-06-30, 11:50

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×