You Are Here:

Community: Developer Discussion Boards

#1 Old problem in n72 and nokia6131 - 2008-10-04, 13:21

Join Date: Oct 2008
Posts: 14
mugiwara
Offline
Registered User
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??
Reply With Quote

#2 Old Re: problem in n72 and nokia6131 - 2008-10-04, 13:26

Join Date: Oct 2007
Posts: 2,841
Location: Deva, Romania
bogdan.galiceanu's Avatar
bogdan.galiceanu
Offline
Forum Nokia Champion
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.
Reply With Quote

#3 Old Re: problem in n72 and nokia6131 - 2008-10-04, 13:54

Join Date: Oct 2008
Posts: 14
mugiwara
Offline
Registered User
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".
Reply With Quote

#4 Old Re: problem in n72 and nokia6131 - 2008-10-04, 13:57

Join Date: Oct 2007
Posts: 2,841
Location: Deva, Romania
bogdan.galiceanu's Avatar
bogdan.galiceanu
Offline
Forum Nokia Champion
Can you please post your midlet's code?
Reply With Quote

#5 Old Re: problem in n72 and nokia6131 - 2008-10-04, 14:05

Join Date: Oct 2008
Posts: 14
mugiwara
Offline
Registered User
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");
}
}
Reply With Quote

#6 Old Re: problem in n72 and nokia6131 - 2008-10-04, 14:25

Join Date: Oct 2007
Posts: 2,841
Location: Deva, Romania
bogdan.galiceanu's Avatar
bogdan.galiceanu
Offline
Forum Nokia Champion
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.
Reply With Quote

#7 Old Re: problem in n72 and nokia6131 - 2008-10-04, 15:05

Join Date: Oct 2008
Posts: 14
mugiwara
Offline
Registered User
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!!
Reply With Quote

#8 Old Re: problem in n72 and nokia6131 - 2008-10-04, 15:20

Join Date: Oct 2007
Posts: 2,841
Location: Deva, Romania
bogdan.galiceanu's Avatar
bogdan.galiceanu
Offline
Forum Nokia Champion
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.
Reply With Quote

#9 Old Re: problem in n72 and nokia6131 - 2008-10-04, 15:35

Join Date: Oct 2008
Posts: 14
mugiwara
Offline
Registered User
MANY THANKS!! i am trying as you have suggested.
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

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

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia