Download PDA Programming Using J2ME

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
PDA Programming Using J2ME
Presenter:涂俊凱
Date:2003/4/8
Out line
Introduction J2ME
CLDC/MIDP API
Preparation of programming
Examples
HTTP Connection, RMS DB, SOAP, XML
Instruction of application development
Step by step
What is J2ME
 Java platform for
small devices
 A subset of Java 2
Standard Edition
 For programming
the Plam
 For programming
the mobile device
(e.g mobile phones
or WinCE…)
CDC (Connected Device Configuration)
CLDC (Connected Limited Device Configuration)
What is J2ME (cont’)
MIDP Profile
应用
Profiles
Layer
Configuration
Layer
MID Profile
CLDC (KVM)
操作系统
OEM
应用
OEM
APIs
Configurations Layer
 A configuration defines the minimum set of libraries
and VM capabilities
 Devices have similar processing and power and
memory constraints
 EX: CDC (Connected Device Configuration)
CLDC (Connected Limited Device Configuration)
Profiles Layer
 A profiles layer is a set of Java Based API that extend
the J2ME definition
 UI and presentation capabilities are generally defined at
this layer
 EX: CLDC => MIDP (Mobile Information Device Profile)
CDC => Personal Profile
CDC => Foundation Profile
CLDC (Connected Limited Device Configuration)
 Addresses
Java language and virtual machine features
Core Java Libraries
Input/Output
Networking
Security
…
 Not Addresses (but in MIDP)
User Interface functionality
Event handling
High-Level application model
Application life-cycle management
CLDC API
io
InputStream, OutputStream, Reader, Writer
lang - No floating point support
util
Calendar, Date, Hashtable, Random, Stack,
TimeZone, Vector, Enumeration
javax.microedition.io
Connection, Datagram, InputConnection,
OutputConnection, Connector
MIDP API
 javax.microedition.midlet
(application management)
 javax.microedition.lcdui
High-level development
Form, TextBox, List, Alert
Low-level development
Canvas: Game applications will likely
make heavy use of the
 javax.microedition.rms
RecordStore
 A record store consists of a collection of
records which will remain persistent
across multiple invocations of the MIDlet
MIDP API Tree
View
Displayable
Alert
Text Box
List
Form
String Item
Date Field
Text Field
Command
Image
Ticker
Choice Group
Canvas
Third-party API
 XML Parser: KXML1.2, KXML2.0, Xparse-J 1.1 ...
 Web Services: KSOAP 1.2
 Floating support: MathFP 2.06
…
API must based on CLDC/CDC or MIDP
Programming the Palm – Part 1
Choice Development Environment
J2ME CLDC API
 Contains a subset of the standard J2SE classes
J2ME KJAVA API(J2ME1.0.3)
 GUI components
 Access the Palm database (PDB)
 Access to IR port
Kawt API(J2ME1.0.3)
 Rich GUI components
J2ME MIDP API
 Works on the top of CLDC
 Some GUI components
Programming the Palm – Part 2
Choice KVM or Java Virtual Machine
 Different KVM has different support
KVM (Support J2ME)
IBM J9 (Support J2ME and specific device’s API support)
…
Programming the Palm – Part 3
Choice Development Toolkit
J2ME Wireless Toolkit
Support Palm…
IBM WebSphere (Device Developer)
Support Palm, WinCE and other devices
JBuilder 7,8 + MobileSet
Based on J2ME Wireless Toolkit
…
XML Example Using KXML1.2 API
RMS Example
HTTP Connection Example
SOAP Example Using KSOAP API
Links
http://cs.mis.nsysu.edu.tw/J2ME/
http://www.javaworld.com/channel_content
/jw-j2me-index.shtml
Related documents