Table 9, A typical sequence of midlet execution – Siemens XT65 User Manual

Page 51

Advertising
background image

Java User’s Guide

6.2 MIDlet Life Cycle

52

s

wm_java_usersguide_v12

Page 51 of 123

2008-02-25

Confidential / Released

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(). You must not terminate your midlet (i.e. having
no threads left) and not calling notifyDestroyed() before.

notifyPaused() – the MIDlet notifies the application management software that it has
paused

resumeRequest() – the MIDlet asks application management software to be started again.

Table 9: A typical sequence of MIDlet execution

Application Management Software

MIDlet

The application management software creates a new instance of a

MIDlet.

The default (no argument) con-

structor for the MIDlet is called; it

is in the Paused state.

The application management software has decided that it is an

appropriate time for the MIDlet to run, so it calls the MIDlet.startApp

method for it to enter the Active state.

The MIDlet acquires any

resources it needs and begins to

perform its service.

The application management software no longer needs the applica-

tion be active, so it signals it to stop performing its service by calling

the MIDlet.pauseApp method.

The MIDlet stops performing its

service and might choose to

release some resources it cur-

rently holds.

The application management software has determined that the

MIDlet

is no longer needed, or perhaps needs to make room for a

higher priority application in memory, so it signals the

MIDlet

that it

is a candidate to be destroyed by calling the MIDlet.destroyApp

method.

If it has been designed to do so,

the

MIDlet

saves state or user

preferences and performs clean

up.

Advertising
This manual is related to the following products: