Midlets; Midlet Documentation; Midlet Life Cycle - Siemens TC45 User Manual

Cellular engine
Hide thumbs Also See for TC45:
Table of Contents

Advertisement

TC45 TC45 JAVA User's Guide
Confidential / Released

5 MIDlets

The J2ME™ Mobile Information Device Profile (MIDP) provides a targeted Java API for
writing wireless applications. The MIDP runs on top of the Connected Limited Device
Configuration (CLDC), which in turn, runs on top of the J2ME™. MIDP applications are
referred to as MIDlets. MIDlets are controlled by the mobile device implementation that
supports the CLDC and MIDP. Since IMP 1.0 is a subset of MIDP 1.0, IMP 1.0 includes
MIDlets. The MIDlet code structure is very similar to applet code. There is no main method
and MIDlets always extend from the MIDlet class. The MIDlet class in the MIDlet package
provides methods to manage a MIDlet's life cycle.

5.1 MIDlet documentation

MIDP and MIDlet documentation can be found at
the html document directory of IMPSIEMENS,
...\Siemens\SMTK\TC45\IMPSiemens\doc\index.html

5.2 MIDlet life cycle

The MIDlet life cycle defines the protocol between a MIDlet and its environment through a
simple well-defined state machine, a concise definition of the MIDlet's states and APIs to
signal changes between the states. A MIDlet has three valid states:
· Paused – The MIDlet is initialised and is quiescent. It should not be holding or using any
shared resources. The Paused state in IMP 1.0 is only used during MIDlet construction, it
will never reached again after changed state from paused state.
· Active – The MIDlet is functioning normally.
· Destroyed – The MIDlet has released all of its resources and terminated. This state is
only entered once.
State changes are affected by the MIDlet interface, which consists of:
· pauseApp() – the MIDlet should release any temporary resources and become passive.
· Note: Because the Paused state is not used in IMP 1.0, this method will never be called.
· startApp() – the MIDlet starts it's execution, needed resources can be acquire here or in
the MIDlet constructor
· destroyApp() – the MIDlet should save any state and release all resources
· Note: destroyApp() is called when a MIDlet should terminate caused by device.
· notifyDestroyed() – the MIDlet notifies the application management software that it has
cleaned up and is done
· Note: the only way to terminate a MIDlet is to call notifyDestroyed(), but destroyApp() is
not automatically called by notifyDestroyed().
· notifyPaused() – the MIDlet notifies the application management software that it has
paused
Note: notifyPaused() is not implemented in IMP 1.0.
· resumeRequest() – the MIDlet asks application management software to be started
again.
Note: notifyPaused() is not implemented in IMP 1.0.
° getAppProperty() – gets a named property from the MIDlet
TC45_JAVA User's Guide_V02
http://wireless.java.sun.com/midp/
Page 31 of 72
and in
30.06.2003

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents