it is really a big date for me! i have launched a “Hello World” J2ME program into my “POOR” Nokia 1681c phone.
this type of Nokia phone is based on “S40″ Operating System which is created by Nokia itself.
Here is a simple 1681c specification(full,1680 classic):
—————————————–
Nokia 1681c specifications & functions:
Dimensions : 107.59X45.99X16.09mm.
Weight : 73.7g.
Volume : 66.55cc.
GSM Dualband (1800/1900MHz).
GPRS (General Packet Radio Service) Class 10.
2.0 WAP browser.
Support Java platform.
MMS (Multimedia Messaging Service).
Nokia S40 v6.2 User Interface.
128X160 pixels 65536 colours CSTN LCD display screen.
Internal antenna.
Speakerphone.
Call vibration.
Voice recording function.
24 bit MP3/MIDI polyphonic ring tone.
Text input predictive software.
STK (Sim Tool Kit).
USB client.
Downloadable applications, games, pictures, animations and ring tones.
Store up to 1000 contact persons in phonebook.
32MB internal memory.
Alarm clock, calendar, calculator, memo, dictionary, Email, PC sync, wallpaper and games.
Up to 420 hours of standby time.
Up to 7.5 hours of talk time.
—————————————–
According to the specification above, i have tried to find more relevant information about S40 platform in Nokia official forum, where Nokia has given a overview about S40 platform and how to develop on S40 platform.
As i do not have much experience on J2ME programming, it is quite difficult for me to find the right way to set up a Hello World program on the Nokia S40 SDK. Now i will write my experience down carefully.
1. Prepare Tools
As Nokia has recommended several tools needed on developement, It includes:
(a) Nokia S40 SDKs
“The Series 40 platform SDKs provide full emulation of the MIDP implementation delivered on Series 40 devices. The emulators also provide features such as KVM speed emulation, a comprehensive diagnostics window, simulation of key phone events (such as an incoming call), and the ability to override a device’s default behaviour.” from Nokia offical forum.
S40 SDKs download here
it should be pointed out that Nokia S40 SDKs have a lot of different versions.
i have chosen “Series_40_5th_Edition_SDK_FP1_Lite_v0_9_en.zip” as my SDK. You could change it yourself through this link. This is a good advice on how to choose a appropriate version of SDKs for your Nokia phone.
(b) IDE
Nokia provides support for the popular NetBeans and Eclipse open source IDEs. i have chosen Eclipse as my IDE.
In addition, installing “EclipseME” provides a set of tools for creating, testing, and packaging MIDlets for Nokia devices.
Eclipse download here
EclipseMe download here
For a simple “Hello World” program, tools shown above are enough.
2. Configuration
it takes me much time on how to configure the J2ME Project in the Eclipse. Then, i found a help documentation related with this subject. it is a documentation of S40 SDK named “SDK help”.
With “Building and running the examples using Eclipse” (C:/Nokia/Devices/S40_5th_Edition_SDK_Feature_Pack_1_Lite/examples/doc-files/BuildingEclipse.html),
i begin to realize the right configuration.
(a) setup EclipseMe into Eclipse
Here, we use the way named “Installing Via A Downloaded Archive Site” to install EclipseMe.
Detailed Information is listed here.
(b) create a J2ME Midlet Suite project
When “Choose the initial properties for the Midlet Suite.”, you click the botton “Manage Device…”.
Then “import device” in the directory (C:\Nokia\Devices\S40_5th_Edition_SDK_Feature_Pack_1_Lite).
At this time, you should remember carefully — Clicking the button “Refresh”. After that, all information on the device will be automatically imported.
You could reference on this page, although it is for S60 platform. The only difference is focus on the different type of devices.
3. Create, Build and Run “Hello World” program
paste “Hello World” program into “HelloWorldMidlet.java” file. Then build the project and run “Hello World” program. Then the console window will show some information for the emulation, which automatically load the SDK emulator to run this program. In the end, we will see “Hello World” shown in the phone emulator.
That’s great! ![]()
Before i started to create “Hello World” project, i have experienced on how to run examples in the Eclipse.
it should be mentioned that if you wanna debug with the emulator, you should “Open Run Dialog” and choose “Wireless Toolkit Emulator” and create a new configuration with the appropriate deivces launched.
Finally, i have fetched the two binary programs named “Hello.jad” and “Hello.jar” from “deployed” directory, and put them to my private web server. Then i use my Nokia 1681c downloaded them by GPRS and install it in my phone. After launching this program, “Hello World” Window is shown successfully on my phone.
Great!
Thanks, God!
No comments:
Post a Comment