Symbian
Symbian OS Library

FAQ-1182 Does pauseApp always get called when a MIDlet gets backgrounded?

[Index][spacer] [Previous] [Next]



 

Classification: Java Category: J2ME MIDP
Created: 12/08/2004 Modified: 12/08/2004
Number: FAQ-1182
Platform: Not Applicable

Question:
Does pauseApp get called when a MIDlet gets backgrounded?

Answer:
On Symbian OS the behaviour of the Java MIDP Application Management System (AMS) is customizable by the handset manufacturer (licensee) so the circumstances under which the notification methods are called (particularly the pauseApp method) may (and does) vary from device to device.

Do not assume pauseApp is automatically called when a MIDlet is backgrounded (looses focus). On Series 60 pauseApp is not automatically called when a MIDlet is backgrounded, whereas on UIQ devices the AMS should call pauseApp when the MIDlet moves to the background.

If the developer wishes to ensure that the MIDlet moves into the PAUSED state in response to being backgrounded then the developer should use the Displayable isShown method or the Canvas hideNotify methods to monitor the state of the display. When the MIDlet is backgrounded, the developer should move the MIDlet into a quiescent state and then invoke pauseNotify to indicate to the AMS that the MIDlet wishes to move to the PAUSED state.

For more information see the White Paper "Programming the MIDlet lifecycle on Symbian OS"
http://www.symbian.com/developer/techlib/papers/java_midp.asp#lifecycle