Pausing a MIDlet

From S60 3rd Ed. FP 2 onwards, you can enable MIDlet pausing with the Nokia-MIDlet-Background-Event and Nokia-MIDlet-Flip-Close JAD attributes.

In many cases it is useful or even necessary to have the MIDlet pause itself automatically. For example, all possible system notifications are shown over the MIDlet, thus the MIDlet is hidden in the background. Note that with Series 40 devices, a phone call, for example, interrupting the application is the only way for the application to enter the Paused state.

MIDP specifications define that a system can set MIDlets to the paused state (the pauseApp() method) if the system needs a lot of the device’s resources. In the paused state, the MIDlet frees all its resources.

In other words, you must create a method that pauses an active session when one of the following events occurs during the MIDlet interaction:

In practice, the MIDlet must always be paused when it is hidden. This is especially important in game applications, because the player will probably lose the game if it is not immediately paused when the game is hidden.

After the paused session is ready to be continued, the Continue option needs to be shown to the user. It can be, for example, one entry of the main menu of the application.

Check that: