Revision as of 12:49, 26 July 2012 by adarsha_saraff (Talk | contribs)

Become an Series 40 application developer - Part 1

From Nokia Developer Wiki
Jump to: navigation, search

This article explains how to ... Develop an Native Application for S40 devices

Skills Level: Beginner.



Java is the Native application development platform for S40 devices. However, Flash Lite and S40 Web environment are also supported by these devices.

Developing applications to these devices are Interesting. S40 phones are like budget phones cost less and more efficient considered to any other manufacturer's low-end devices. Most of the users of phones are students, teachers, farmers, senior citizen and taxi drivers and all. The total number of users are not few 100's neither millions. More than 3 billion people are using S40 devices. So, your are going to develop applications for billions of people.

When it comes to development, Series 40 devices have different screen resolutions, different memory size, different CPU clock rates and different hardware type. There are Classic phones, Touch and Type phones, Qwerty Phones and Full Touch phones. When it comes to screen resolution; it ranges from small screen (128x160 pixels) to medium (240x320 pixels, 320x240 pixels) and to large (240x400 pixels) resolutions.

We need to consider memory at most. For some of device max. jar size allowed is 2MB and max. heap memory available is 4MB. S40 devices are feature phones and there are some smart phones also,(ex: Asha 303 and Asha 311) which have got processing power of 1GHz.

Beginning With Development

Through out the development process, we will use two IDE's and three SDK's. We will use NetBeans IDE with Sun Java Micro-edition SDK to develop application for classic phones, NetBeans IDE with Nokia Java SDK 1.1 for Touch and Type devices and Nokia IDE for full touch devices.

In this "Become an S40 application developer - Part 1", I will cover the things about - Creating and running a project in both NetBeans and Nokia IDE.

Getting Started with NetBeans IDE

Download the latest NetBeans IDE with JavaME technology included and follow the procedure to install and configure the IDE.

NetbeanIDEStartPage.png This is how NetBeans IDE looks like when it is launched.

Creating and Running a first project

Create a New Project by press "Ctrl+Shift+N" keyboard shortcut or File>New Project. Now in New Project window select "JavaME" and "Mobile Application" and hit "Next" button.

Now in New Mobile Application window, enter the Project Name as s40_firstapp and make sure that "Set as Main Project" and "Create Hello MIDlet" is checked and click "Next" button.
Netbean first project step1.png

Now Make sure that Emulator Platform" is set to "CLDC Oracle Java(TM) Platform Micro Edition SDK" and Device to "DefaultCldcPhone1" and Device Configuration to "CLDC-1.1" and Device Profile to "MIDP-2.0" and click "Finish" button.
Netbean first project step2.png

The bellow picture shows the components of NetBeans IDE, with which you are going to work.
Netbean first project step3.png
1- Source - Here your are going to code all program statement.
2- Screen - Visual editor to work with form components.
3- Flow - Shows flow diagram of command and actions.
4- Displays - Drag and Drop option to create all display components like Form, Alert, List etc.
5- Commands - Drag and Drop option to create commands.
6- Elements - Drag and Drop option for components to add to list, choice group and all.
7- Properties - Shows properties of the selected component. We use this to change name, type and all.
8- Clean and Build - Clears all previously build jar files and builds again.
9- Run - Runs the jar file on emulator.
10 - Work-space - Work-space to work with.

Now your first project is ready to run. Run project by clicking Run button.
Netbean first project step4.png Picture: Running a project.
Wow, you just created your project by coding nothing. You might be amazing how is this possible to get output without writing any code. That's because NeatBean had generated code on behalf of you. Now explore the code, by clicking on "Source" button.

546 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.