Professional Documents
Culture Documents
for fun, but can be educational
Calculation / Computation tools
e.g., medical calculators, etc.
Provide a better user interface to a service
can be useful for data forms
?What J2ME lets you do
Computation / logic
general-purpose language
limited only by processor speed and memory
Graphics
including 3D on new phones
Connectivity
SMS, MMS, Bluetooth, HTTP
Other Features
NFC/RFID, Location, etc.
J2ME Components
J2ME
Components
Optional
Packages
Profiles
Configurations
Notes
Unlike the desktop and server worlds targeted by J2SE
and J2EE, the micro-world includes such a wide range of
devices with vastly different capabilities that it is not
possible to create a single software product to suit all of
them.
Instead of being a single entity, therefore, J2ME is a
collection of specifications that define a set of a
platforms, each of which is suitable for a subset of the
total collection of consumer devices that that fall within
its scope.
The subset of the full Java programming environment for
a particular device is defined by one or more profiles,
which extend the basic capabilities of a configuration.
Configurations
Comprised of
Virtual Machine
Core libraries
Classes, APIs
Configurations
Configuration
CLDC CDC
Profile
Mobile
Personal Foundation Personal Personal
Information
Digital Profile Basis Profile Profile
Device
Assistant
Profile
Profile
Mobile Application
Profile
MIDP
Mobile Information Device Profile (MIDP) defines API’s for user interface
components, input & event handling, persistent storage, networking & timers, allowing for screen &
memory limitation of mobile devices
Minimal characteristics of MIDs:
Enough memory to run MIDP applications,
Display of at least 96 X 56 pixels, either monochrome or color
A keypad, keyboard, or touch screen
Two-way wireless networking capability
Optional Packages
MM API – mobile media supports audio/video
controls, streaming media
WMA API – wireless messaging, SMS and MMS
(multimedia messaging systems)
Location API – tracking of wireless devices
J2ME Web Services API – web services related XML
processing
Bluetooth API – Bluetooth communications protocol
Security and Trust API – interaction with security
smart card
Notes
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
Display
Displayable
The Displayable Hierarchy
Example:
Command c = new Command(“OK”,
Command.OK, 0);
Commands
Responding to user activation
of Commands
MIDlet
Commands: Summary
Commands
Forms
A form includes collection of UI controls called Items
)public Form(String title
)public Form(String title,Item[] items
public int append()
public void set(int index,Item item)
public void delete(int index)
public void deleteAll()
public int size()
public Item get(int index)
Forms
form.append(strItem);
Terminology
Soft Buttons