developing software for wireless devices
DESCRIPTION
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 - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Developing Software for Wireless Devices](https://reader030.vdocuments.us/reader030/viewer/2022032604/56812b2a550346895d8f375e/html5/thumbnails/1.jpg)
Developing Software for Wireless Devices
Robert Hatch
Sean Meredith
James Pate Williams, Jr.
![Page 2: Developing Software for Wireless Devices](https://reader030.vdocuments.us/reader030/viewer/2022032604/56812b2a550346895d8f375e/html5/thumbnails/2.jpg)
Overview
• Sun Java SDK 1.3
• Forte
• Sun Java Micro Edition
• Packages of MIDP
![Page 3: Developing Software for Wireless Devices](https://reader030.vdocuments.us/reader030/viewer/2022032604/56812b2a550346895d8f375e/html5/thumbnails/3.jpg)
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](https://reader030.vdocuments.us/reader030/viewer/2022032604/56812b2a550346895d8f375e/html5/thumbnails/4.jpg)
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](https://reader030.vdocuments.us/reader030/viewer/2022032604/56812b2a550346895d8f375e/html5/thumbnails/5.jpg)
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](https://reader030.vdocuments.us/reader030/viewer/2022032604/56812b2a550346895d8f375e/html5/thumbnails/6.jpg)
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](https://reader030.vdocuments.us/reader030/viewer/2022032604/56812b2a550346895d8f375e/html5/thumbnails/7.jpg)
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](https://reader030.vdocuments.us/reader030/viewer/2022032604/56812b2a550346895d8f375e/html5/thumbnails/8.jpg)
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](https://reader030.vdocuments.us/reader030/viewer/2022032604/56812b2a550346895d8f375e/html5/thumbnails/9.jpg)
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](https://reader030.vdocuments.us/reader030/viewer/2022032604/56812b2a550346895d8f375e/html5/thumbnails/10.jpg)
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](https://reader030.vdocuments.us/reader030/viewer/2022032604/56812b2a550346895d8f375e/html5/thumbnails/11.jpg)
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](https://reader030.vdocuments.us/reader030/viewer/2022032604/56812b2a550346895d8f375e/html5/thumbnails/12.jpg)
Persistence Package
• Components– RecordComparator– RecordEnumeration– RecordFilter – RecordListener
• Associated class– RecordStore - a class representing a record
store
![Page 13: Developing Software for Wireless Devices](https://reader030.vdocuments.us/reader030/viewer/2022032604/56812b2a550346895d8f375e/html5/thumbnails/13.jpg)
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](https://reader030.vdocuments.us/reader030/viewer/2022032604/56812b2a550346895d8f375e/html5/thumbnails/14.jpg)
MIDlet Life Cycle
![Page 15: Developing Software for Wireless Devices](https://reader030.vdocuments.us/reader030/viewer/2022032604/56812b2a550346895d8f375e/html5/thumbnails/15.jpg)
Networking Package
• Components– Connection– ContentConnection– Datagram– DatagramConnection– HttpConnection– InputConnection
![Page 16: Developing Software for Wireless Devices](https://reader030.vdocuments.us/reader030/viewer/2022032604/56812b2a550346895d8f375e/html5/thumbnails/16.jpg)
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](https://reader030.vdocuments.us/reader030/viewer/2022032604/56812b2a550346895d8f375e/html5/thumbnails/17.jpg)
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](https://reader030.vdocuments.us/reader030/viewer/2022032604/56812b2a550346895d8f375e/html5/thumbnails/18.jpg)
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](https://reader030.vdocuments.us/reader030/viewer/2022032604/56812b2a550346895d8f375e/html5/thumbnails/19.jpg)
Core Packages
• java.io
• java.lang
• java.util
![Page 20: Developing Software for Wireless Devices](https://reader030.vdocuments.us/reader030/viewer/2022032604/56812b2a550346895d8f375e/html5/thumbnails/20.jpg)
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](https://reader030.vdocuments.us/reader030/viewer/2022032604/56812b2a550346895d8f375e/html5/thumbnails/21.jpg)
Demo