+ All Categories
Transcript
Page 1: Developing Software for Wireless Devices

Developing Software for Wireless Devices

Robert Hatch

Sean Meredith

James Pate Williams, Jr.

Page 2: Developing Software for Wireless Devices

Overview

• Sun Java SDK 1.3

• Forte

• Sun Java Micro Edition

• Packages of MIDP

Page 3: Developing Software for Wireless Devices

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

Page 4: Developing Software for Wireless Devices

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

Page 5: Developing Software for Wireless Devices

Sun Forte 3.0

• Integrated Development Environment for Java programming

• comparable to Borland’s JBuilder 5.0

• constructed using Java

• a resource hog

Page 6: Developing Software for Wireless Devices

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

Page 7: Developing Software for Wireless Devices

Wireless Toolkit

• The toolkit includes the following emulators:– default grey phone– minimum phone– Motorola i85s– Palm OS device– RIM Java handheld

Page 8: Developing Software for Wireless Devices

Wireless Toolkit

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

Page 9: Developing Software for Wireless Devices

Java Mobile Information Device Profile (MIDP)

• Consists of five packages:– user interface package– persistence package– application lifecycle package– networking package– core packages

Page 10: Developing Software for Wireless Devices

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

Page 11: Developing Software for Wireless Devices

User Interface Package: Common GUI Elements

• Alert• Canvas• Command• ChoiceGroup• DateField• Display• Font• Form

• Gauge• Graphics• Image• Item• List• Screen• Ticker

Page 12: Developing Software for Wireless Devices

Persistence Package

• Components– RecordComparator– RecordEnumeration– RecordFilter – RecordListener

• Associated class– RecordStore - a class representing a record

store

Page 13: Developing Software for Wireless Devices

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

Page 14: Developing Software for Wireless Devices

MIDlet Life Cycle

Page 15: Developing Software for Wireless Devices

Networking Package

• Components– Connection– ContentConnection– Datagram– DatagramConnection– HttpConnection– InputConnection

Page 16: Developing Software for Wireless Devices

Networking Package

• Components– OutputConnection– StreamConnection– StreamConnectionNotifier

• Associated class– Connector - placeholder for the static methods

that are used for creating all the Connection jobs.

Page 17: Developing Software for Wireless Devices

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

Page 18: Developing Software for Wireless Devices

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

Page 19: Developing Software for Wireless Devices

Core Packages

• java.io

• java.lang

• java.util

Page 20: Developing Software for Wireless Devices

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

Page 21: Developing Software for Wireless Devices

Demo


Top Related