×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Registered User
    Join Date
    Oct 2008
    Posts
    14

    problem in n72 and nokia6131

    hi all
    recently i created a midlet (encryption decryption, copy paste to from sms).

    the thing is that it works perfectly well on my nokia 6500 slide.
    but gives errors(invalid application,installation problem) on my friends phone (nokia n72, nokia 6131).

    just wanna know why this is happening.
    are they too old??

  2. #2
    Super Contributor
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: problem in n72 and nokia6131

    I suppose you used JSR 177 for encryption and decryption. 6500 slide supports it, N72 and 6131 do not. That's most likely why you were getting the errors.

  3. #3
    Registered User
    Join Date
    Oct 2008
    Posts
    14

    Re: problem in n72 and nokia6131

    Thanks for your speedy help!I have just developed this simple midlet that is to perform the encryption.I have not made use of JSR 177.I ran the code in NetBeans and downloaded the .JAR file from there into my phone.It ran perfectly in my 6500 slide but in Nokia 6131 & N72 they are receiving this invalid aplication message. i mime it simply ran, but in those phones it is first being installed and then it flashes "invalid application".

  4. #4
    Super Contributor
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: problem in n72 and nokia6131

    Can you please post your midlet's code?

  5. #5
    Registered User
    Join Date
    Oct 2008
    Posts
    14

    Re: problem in n72 and nokia6131

    Here is my code:

    import javax.microedition.midlet.*;
    import javax.microedition.lcdui.*;

    public class aj2 extends MIDlet implements CommandListener
    { Form mForm;
    Command mCommandQuit;
    Command mCommandItem;
    TextField mTextField;
    Display mDisplay;
    String a;
    String b="";

    public void startApp()
    {System.out.println("startApp");
    mForm=new Form("Mugiwara Pirates");
    mCommandQuit=new Command("QUIT",Command.EXIT,0);
    mCommandItem=new Command("ENCRYPT",Command.ITEM,0);
    mTextField=new TextField(null,"",100, TextField.ANY);
    mForm.append(mTextField);
    mForm.addCommand(mCommandQuit);
    mForm.addCommand(mCommandItem);
    mDisplay=Display.getDisplay(this);
    mDisplay.setCurrent(mForm);
    mForm.setCommandListener(this);
    }

    public void commandAction(Command c, Displayable s)
    {System.out.println("commandAction");
    if(c==mCommandQuit)
    notifyDestroyed();
    else if(c==mCommandItem)
    {String mstring=mTextField.getString();
    for(int i=0;i<mstring.length();i++)
    {int current=mstring.charAt(i);
    if(current>64 && current<91)
    {current=current+3;
    if(current>90)
    current=current-26;
    }
    else if(current>96 && current<123)
    {current=current+3;
    if(current>122)
    current=current-26;
    }
    a=new Character((char)current).toString();
    b=b+a;
    }
    mForm.append("\nThe encrypted code is:\n");
    mForm.append(b);
    }
    }

    public void destroyApp(boolean unconditional)
    {System.out.println("destroyApp");
    }

    public void pauseApp()
    {System.out.println("pauseApp");
    }
    }

  6. #6
    Super Contributor
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: problem in n72 and nokia6131

    The code looks fine. I tried it on my N95 and it worked.

    I don't have an S60 2nd edition or a Series 40 device so I don't know exactly how they handle this, so this is just a guess: is your project configured for CLDC 1.1 and MIDP 2.1? If so, that's most likely the problem. N72 and 6131 only support MIDP 2.0.

  7. #7
    Registered User
    Join Date
    Oct 2008
    Posts
    14

    Re: problem in n72 and nokia6131

    Thank you!!
    My mother's Nokia 3600 also runs the program.It supports MIDP 2.1 & so does my phone & yours N95.
    While N72, 6131 & SE W810i don't support MIDP 2.0.

    Interestingly the above 3 also don't support JSR 177.

    I just wrote a general code.I had no idea whether it was MIDP 2.1 specific.Are there some downloads available so that the other phones can also run the application??

    Is there a way to make it compatible with MIDP 2.0??
    Many many thanks for your support!!

  8. #8
    Super Contributor
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: problem in n72 and nokia6131

    Quote Originally Posted by mugiwara View Post
    I just wrote a general code.I had no idea whether it was MIDP 2.1 specific.Are there some downloads available so that the other phones can also run the application??
    The code itself should be MIDP version independent. I tried it on the S60 3rd edition FP2 emulator. First I configured the project for MIDP 2.1 and it worked. Then I configured it for MIDP 2.0 and it worked. As far as I can tell, the only difference is that the MIDP version is specified in the midlet's manifest and JAD file. If the specified version is the same as the version that the device supports, it will work. Otherwise it won't. There is no way to change the MIDP version of a phone, through downloads or otherwise.

    Quote Originally Posted by mugiwara View Post
    Is there a way to make it compatible with MIDP 2.0??
    One solution would be to simply make a project for MIDP 2.0. Another might be to set the MicroEdition-Profile attribute in the manifest and JAD file to both MIDP-2.0 and MIDP-2.1 (I haven't tested this).

    Oh and if you're interested to see how JSR 177 can be used for encryption/decryption, here's an article about it.

  9. #9
    Registered User
    Join Date
    Oct 2008
    Posts
    14

    Re: problem in n72 and nokia6131

    MANY THANKS!! i am trying as you have suggested.

Posting Permissions

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