Topic 2 - Slide Notes
Topic 2 - Slide Notes
Contd...
• A MIDlet goes through the following states:
1. When the MIDlet is about to be run, an instance is
created by the MIDlet’s constructor, and the MIDlet is
in the Paused state.
2. Next, the MIDlet enters the Active state after the
application manager calls startApp().
3. While the MIDlet is Active, the application manager
can suspend its execution by calling pauseApp(). This
puts the MIDlet back in the Paused state. A MIDlet can
place itself in Paused state by calling notifyPaused().
4. While the MIDlet is in the Paused state, the
application manager can call startApp() to put it back
into the Active state.
Page 5 of 11 Dr. Mwakondo PhD (Computer Science) UoN
pauseApp()
destroyApp(Boolean unconditional)
3.Compile
–convert the source code into object code or bytecode
in java
4.Preverify
–check and ensure that the class file is structurally
and conceptually correct as per the JVM
specifications
5.Package
–prepare the MIDlet for testing and deployment
where the manifest and jar files are created
6.Test
Page 8 of 11 Dr. Mwakondo PhD (Computer Science) UoN
Public DateTimeApp()
timeAlert=new Alert(“Alert”);
timeAlert.setString(new Date().toString());
}
Public void startApp(){
Display.getDisplay(this).setCurrent(timeAlert);
}
Public void pausedApp(){
}
Public void destroyApp(Boolean unconditional){
}
}
Page 11 of 11 Dr. Mwakondo PhD (Computer Science) UoN