Lecture Notes
On
Mobile Application Development (MAD)
MCA III year I semester
Topic: Introduction to J2ME & J2ME Profiles
By
G Indira Priyadarshini
Associate Professor
MCA Department
Vidya Jyothi Institute of Technology
Hyderabad.
MOBILE APPLICATION DEVELOPMENT
USING
J2ME
What is J2ME
J2me is a software or specification for developing small computing devices
Or
J2me is a Java platform designed for Small Computing Devices ranging from
pagers, mobile phones, Personal Digital Assistance (PDA) to the set up boxes.
J2ME provides a robust, flexible environment for applications running on mobile
and other embedded devices such as mobile phones, personal digital assistants
(PDAs), TV set-top boxes, and printers.
J2ME includes flexible user interfaces, robust, security, built-in network
protocols, and support for networked and offline applications that can be
downloaded dynamically.
Applications based on J2ME are portable across many devices, yet leverage each
device's native capabilities.
J2ME is divided into
Configurations
Profiles &
Optional API’s
J2ME Configuration :
A configuration is a complete Java runtime environment, consisting of:
Java virtual machine (VM) to execute Java bytecode
Native code to interface to the underlying system
Set of core Java runtime classes
currently J2ME supports two standard configurations:
Connected Limited Device Configuration (CLDC)
Connected Device Configuration (CDC)
J2ME
J2ME
Configuration
Configuration
CLDC
CLDC CDC
CDC
CDC
Full Java implementation
32 bit
Device must have >= 2MB memory
CLDC
Subset of Java
16 or 32 bit
Device with 160 – 512 kb memory
3 sizes of Virtual Machines are specified
1MB – 10MB Classic VM (CVM)
10kb – 500kb Kilo VM (kVM)
8bit Card VM
J2ME Profiles :
A profile complements a configuration by adding additional classes that
provide features appropriate to a particular type of device or to a specific
vertical market segment. Both J2ME configurations have one or more
associated profiles, some of which may themselves rely on other profiles.
It Guarantees interoperability within device verticals
Industry groups specify profiles for each of the configurations (Nokia,
AOL, Palm, Oracle, etc)
The Profiles supported by J2ME are
MIDP Mobile Information Device Profile
Foundation Profile (non gui networked device)
Personal basis, Personal and RMI Profiles
Game Profile
Mobile Information Device Profile (MIDP)
This profile Addresses
Persistence
Networking
Application life-cycle management
Event handling
Hardware characteristics
Screen size 96 x 54
Touch screen and/or ½ handed key input
128k non-volatile memory plus 8k for persistence, 32k
for Java Runtime
Support for 2-way wireless networking
MIDP Applications are called MIDlets
MIDP device contains a program called the Application Management
Software (AMS) which downloads the MIDlet suite from the server, opens the
MIDlet suite, then launches the user-specified MIDlet on the MIDP device
High level API’s
Textfields, lists, forms and images for programs such as e-commerce
applications & basic user interfaces
Low level API’s
Incorporate graphics & shapes at precise pixel locations, provides
animation for games applications
MIDP Lifecycle
constructor method called
paused state
startApp method called pauseApp method called
active
state
destroyApp method
called
PDA Profile (PDAP)
The PDA Profile is similar to MIDP, but it is aimed at PDAs that have better screens and
more memory than cell phones.
Foundation Profile
The Foundation Profile extends the CDC to include almost all of the core Java 2 Version 1.3
core libraries. As its name suggests, it is intended to be used as the basis for most of the
other CDC profiles.
Personal Basis and Personal Profiles
The Personal Basis Profile adds basic user interface functionality to the Foundation Profile. It
is intended to be used on devices that have an unsophisticated user interface capability, and
it therefore does not allow more than one window to be active at any time. Platforms that can
support a more complex user interface will use the Personal Profile instead.
RMI Profile
The RMI Profile adds the J2SE Remote Method Invocation libraries to the Foundation
Profile. Only the client side of this API is supported.
Game Profile This will provide a platform for writing games software on CDC devices.
Book’s to be referred:
1) The Complete Reference J2ME
By James Keogh
2) J2ME in a Nutshell
By Kim Topley
O ‘REILLY publisher