tags:

views:

91

answers:

2

what actions should be taken in the pauseApp method of a Java ME midlet. what is the purpose of having this method.

+2  A: 

This is a pretty good description. Say you are writing a Tetris game, you would stop the brick from falling when paused. On a phone, interruptions happen and resources are limited, so you need to write your code to accommodate them.

Yishai
I'd like to add by saying that there are a lot of devices that simply ignore the spec and don't call this when they should. If you're working with Canvas you'd be better off using the showNotify()/hideNotify mechanism which works well on every device i've ever tested (a wide variety).
Orr Matarasso
A: 

Midlet javadoc tells us that this method is called when the application is set in paused mode. Paused mode corresponds to the event of the user pausing the application, or the application being paused by something more urgent, like a phone call.

Valentin Rocher
user pausing the application how?
iamrohitbanga
many phones allow the user to pause a java app, for example on my phone if I press the return button, my phone is back to the main screen, and the application is paused (but not stopped)
Valentin Rocher