×
Namespaces

Variants
Actions
Revision as of 10:24, 20 July 2012 by hamishwillee (Talk | contribs)

How to handle MIDlet sent to the background

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata
Compatibility
Platform(s):
Series 40
Symbian
Article
Created: hartti (23 Jun 2007)
Last edited: hamishwillee (20 Jul 2012)

On some devices the Application Management System (AMS) calls PauseApp for example when the phone gets a phone call, the MIDlet is sent to the background for some other reason, or when the flip/slide of the phone is closed.

The pauseApp() method is not called on Nokia developer platforms. Instead the hideNotify() method in Canvas class is called when MIDlet is sent to the background. If the MIDlet does not use Canvas, but high-level UI screens, the MIDlet should periodically check isShown() method (belongs to Displayable class) whether or not the MIDlet has been sent to the background. Of course, this is needed only if the MIDlet especially needs to know when it is on the foreground and when it is on the background.

58 page views in the last 30 days.