Developing Software for Wireless Devices

neversinkhurriedΚινητά – Ασύρματες Τεχνολογίες

12 Νοε 2013 (πριν από 3 χρόνια και 7 μήνες)

78 εμφανίσεις

Developing Software for Wireless
Devices

Robert Hatch

Sean Meredith

James Pate Williams, Jr.

Overview


Sun Java SDK 1.3


Forte


Sun Java Micro Edition


Packages of MIDP

Desirable Software Components


Sun Java 1.3.1+ Software Development Kit


Sun Forte 3.0 Integrated Development
Environment


Sun Java 2 Micro Edition Wireless Toolkit


All are freely downloadable from Sun and
require at least a 450 MHz Pentium II with
128 MB of RAM

Sun Java 2 SDK 1.3


Improvements


more robust than previous Java SDKs


sound API that includes a MIDI synthesizer and
sequencer


support for the Java 2 Micro Edition Wireless
Toolkit

Sun Forte 3.0


Integrated Development Environment for
Java programming


comparable to Borland’s JBuilder 5.0


constructed using Java


a resource hog

Sun Java2 ME Wireless Toolkit


Version 1.0.3 can be used either in
integrated mode with Forte 3.0 or as a stand
alone product.


The integrated version is easier for code
development and testing


The Wireless Toolkit implements a Mobile
Information Device Profile (MIDP) for
some common wireless devices

Wireless Toolkit


The toolkit includes the following
emulators:


default grey phone


minimum phone


Motorola i85s


Palm OS device


RIM Java handheld

Wireless Toolkit


The emulators can function fairly closely to
read devices in terms of the GUIs that they
offer.

Java Mobile Information Device
Profile (MIDP)


Consists of five packages:


user interface package


persistence package


application lifecycle package


networking package


core packages

User Interface Package


Listener interfaces


ChoiceAPI


CommandListener


ItemStateListener


Buttons


defined as commands


actions can be captured by implementing the
CommandListener interface, e.g. by defining
the commandAction method

User Interface Package:
Common GUI Elements


Alert


Canvas


Command


ChoiceGroup


DateField


Display


Font


Form


Gauge


Graphics


Image


Item


List


Screen


Ticker

Persistence Package


Components


RecordComparator


RecordEnumeration


RecordFilter


RecordListener


Associated class


RecordStore
-

a class representing a record
store

Application Lifecycle Package


Defines Mobile Information Device Profile
applications and interactions between the
application and the environment in which
the application runs


Class associated


MIDlet
-

MIDP application on the device


States


Paused


Active


Destroyed

MIDlet Life Cycle

Networking Package


Components


Connection


ContentConnection


Datagram


DatagramConnection


HttpConnection


InputConnection

Networking Package


Components


OutputConnection


StreamConnection


StreamConnectionNotifier


Associated class


Connector
-

placeholder for the static methods
that are used for creating all the Connection
jobs.


Networking Package


Support for stream connections (TCP/IP)
and datagram connections (UDP/IP)


TCP/IP
-

connection
-
oriented protocol; reliable
and in
-
order delivery of packets


UDP/IP
-

connectionless
-
oriented protocol;
unreliable and possibly out
-
of
-
order delivery of
packets

Networking Package (Cont.)


Some wireless devices such as Palm OS
devices do not offer the datagram protocol
and only use stream connections


Java MIDP supports HTTP connections


TCP/IP networking is fairly straightforward
and only requires a few lines of code to
implement

Core Packages


java.io


java.lang


java.util

Wireless Device Software
Development Steps


Create a MIDlet suite template using Forte 3.0


Fill in the MIDlet details to incorporate desired
functionality


Execute code on various emulators; the same
code behaves differently on distinct platforms


Port code to desired device


Test on an actual wireless device

Demo