| Reply | « Previous Thread | Next Thread » |
|
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?? |
|
Join Date: Oct 2007
Posts: 2,841
Location: Deva, Romania
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.
|
|
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".
|
|
Join Date: Oct 2007
Posts: 2,841
Location: Deva, Romania
Offline
Forum Nokia Champion
|
|
Can you please post your midlet's code?
|
|
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"); } } |
|
Join Date: Oct 2007
Posts: 2,841
Location: Deva, Romania
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. |
|
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!! |
|
Join Date: Oct 2007
Posts: 2,841
Location: Deva, Romania
Offline
Forum Nokia Champion
|
|
|
Quote:
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. |
|
MANY THANKS!! i am trying as you have suggested.
|
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|