How to handle MIDlet sent to the background
Article Metadata
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.


Asjadazeem - pauseApp() when call comes
How to make sure that my game stops at the call like what to do if I want to resume my game canvas that has been called from midlet and it can be called just once. I have implemented hideNotify() for game canvas and its working but I am unable to findout how to stop a game when call comes, please help I am unable to find help yet!
Thanks in advance!asjadazeem 21:28, 1 March 2013 (EET)
Hamishwillee - Call stop
Hi
I suggest you check out the examples (or just search on this wiki) for implementations of hideNotify. For example:
If that doesn't help, then I would suggest you raise the issue on the java discussion boards as this article is many years old and the author many no longer be watching it.
regards
Hamishhamishwillee 01:47, 4 March 2013 (EET)