Ahmad
Ahmad

Reputation: 427

run codenameone j2me application on samsung devices

I create j2me application with codenameone and it works well in Nokia phones, however I wanna install or run it on Samsung devices (for instance S8300) I'll get error.

How can I fix this error?

I searched for this device's details and I found it doesn't have operting system but it can run java with MIDP2.0. What can I do for these device types? How can I run it on these devices?

Thanks in advance.

Upvotes: 1

Views: 523

Answers (3)

Ahmad
Ahmad

Reputation: 427

We must create UI by hard coding not using lwuit or codenameone designer. cause of some devices that don't have an OS and just support MIDP can't run these type of applcations which are create by lwuit or codenameone desiner.

Maybe it cause of resource file path in devices!

Upvotes: 0

Shai Almog
Shai Almog

Reputation: 52760

Check that you didn't use Java 5 language features and limited yourself to the CLDC 1.1 API specification in terms of classes such as java.util.

Codename One includes support for these features which work well on Nokia where the VM is more compliant but fails on some devices when these features are used.

Upvotes: 1

Meier
Meier

Reputation: 3880

Several things things may be the problem:

1) the jar file is to big. Java device have often constraints for max size of jar file, some of them unbelievable small. try to install a smaller jar file, like a hello world. If this is problem, make sure you use "obfuscate", as it also removes unused code from the jar file.

2) Depending on operator branding, Samsung devices often do not allow to install the jar file directly from PC (with bluetooth or usb cable) :-(

What is possible only is called OTA-Download. There you need to create a jad file and a jar file, put them on a webserver, and call the url from jad in the mobile browser of the device. You need to change the MIDlet-Jar-URL inside to have the absolute url of the jar file on your web server.

This is all quite complex. to check that your webserver is correctly set up and that that jad file has no syntax errors, you can use my jad checker: jadcheck.appspot.com

Upvotes: 1

Related Questions