Name

javax.microedition.midlet.MIDlet

Synopsis

This abstract class is the base class of all MIDlet applications. The methods specified in this class allow MIDlet management software to create, start, pause, and destroy a MIDlet. Hence, a MIDlet can be in one of three states: paused, active, or destroyed.

A MIDlet becomes active when the startApp( ) method is called. In this state, the MIDlet may hold resources. To change the MIDlet’s state to pause, the pauseApp( ) method is used. The destroyApp( ) method is used to terminate and enter the destroyed state. In the destroyed state, the MIDlet must release all resources and save any persistent data. This method can be called from the active and paused states. If destroyApp( ) is passed true, the MIDlet must clean up and release all resources. If false, the MIDlet may throw MIDletStateChangeException, indicating it does not want to be destroyed.

public abstract classMIDlet {
   // protected constructors
   protected MIDlet(  );
   // protected instance methods
   protected abstract void destroyApp(boolean unconditional) throws
                           MIDletStateChangeException;
   protected abstract void pauseApp(  );
   protected abstract void startApp(  ) throws MIDletStateChangeException;
   // public instance methods
   public final String getAppProperty(String key);
   public final void notifyDestroyed(  );
   public final void notifyPaused(  );
   public final void resumeRequest(  );
}

Get Wireless Java now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.