Posts Tagged ‘programming’
Porting JavaME apps to Android is easier with J2ME Polish
Great news for JavaME developers! The J2ME Polish project has announced that their upcoming j2mepolish 2.1 toolkit suite will support porting JavaME apps to Google Android mobile platform automatically! This means that the current JavaME developers will enjoy the advantages of porting their existing mobile application to Android effortlessly.

According to their press release, the next j2mepolish release will focus on automating the process of converting JavaME MIDlets to iPhone application.
J2ME Polish 2.1: Android support?

Currently I’ve yet to see how a ported JavaME application would look like on an Android mobile phone, but hopefully it would be as good as the ordinary Google Android app. At this time of this writing, J2ME Polish 2.1 is only available as a preview release which can be downloaded from J2ME Polish website.
I’ll update this blog about this feature once J2ME Polish 2.1 has been released.
p/s: I’m Eager to know how a JavaME app will look like once its ported to Android.
SymbianTutorial.org – Symbian application development basic
SymbianTutorial.org is a good website to learn about fundamental application development in Symbian (especially series60).
Though some information about the IDE is slightly outdated (as stated on the website), the tutorial website covers basic Symbian data type, class naming convention, exception handling, input/output, gui handling basics and how to create resource file for Symbian development platform.
The website itself is structred in a way to introduce reader to Symbian application development environment, which is the main platform used in Nokia and Sony-Ericsson smartphones.
How to generate Random Numbers in J2ME application
One of the popular question asked in this blog is ways to generate random numbers in J2ME application.
As most people probably realized, the JavaME CLDC does not include the Math.Random class to generate random numbers. However one can generate a series of random numbers in JavaME/J2ME application by using the included java.util.Random class.
Here’s a sample usage
import java.util.Random;
...
Random generator = new Random();
generator.setSeed(System.currentTimeMillis());
float f = generator.nextFloat();
System.out.println(""+(f*100.0f)%100);
...
The sample code above will produce a random floating-point number between 0..100 (exclusive)
Here’s the source code for the full Random Number Demo application : RandomDemo.java,