Hello World Midlet; Table 2: A Typical Sequence Of Midlet Execution Is - Siemens TC45 User Manual

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

Advertisement

TC45 TC45 JAVA User's Guide
Confidential / Released

Table 2: A typical sequence of MIDlet execution is:

Application Management Software
The application management software creates a new instance of a
MIDlet
.
The application management software has decided that it is an
appropriate time for the
MIDlet.startApp
method for it to enter the Active state.
The application management software no longer needs the
application be active, so it signals it to stop performing its service
by calling the MIDlet.pauseApp method.
* IMP 1.0 does not need the Paused state except for default
constructor for the MIDlet. A MIDlet.pauseApp method is not
necessary.
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
is a candidate to be destroyed by calling the
method.

5.3 Hello World MIDlet

Here is a sample HelloWorld program.
/**
* HelloWorld.java
*/
package example.helloworld;
import javax.microedition.midlet.*;
import java.io.*;
public class HelloWorld extends MIDlet {
/**
* HelloWorld - default constructor
*/
public HelloWorld() {
System.out.println("HelloWorld: Constructor");
}
/**
* startApp()
*/
public void startApp() throws MIDletStateChangeException {
System.out.println("HelloWorld: startApp");
System.out.println("\nHello World!\n");
notifyDestroyed();
}
/**
* pauseApp()
*/
public void pauseApp() {
System.out.println("HelloWorld: pauseApp()");
}
TC45_JAVA User's Guide_V02
MIDlet
to run, so it calls the
MIDlet.destroyApp
Page 32 of 72
MIDlet
The
default
constructor for the
called; it is in the Paused state.
MIDlet
The
resources it needs and begins to
perform its service.
The MIDlet stops performing its
service and might choose to
release
currently holds.
If it has been designed to do so,
MIDlet
the
MIDlet
preferences and performs clean
that it
up.
(no
argument)
MIDlet
is
acquires
any
some
resources
it
saves state or user
30.06.2003

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents