Resources | Resources |



How applications are suspended and resumed

The current top-visible Brew MP application is suspended when another application needs to become top-visible to have access to the display and the keypad. Examples include:

  • Low battery warning
  • Incoming phone call
  • Incoming non-Brew SMS message

To demonstrate what happens during suspend/resume, consider the case of an incoming call while a Brew MP application is running. EVT_APP_SUSPEND and EVT_APP_RESUME go hand-in-hand, while the events EVT_APP_STOP and EVT_APP_START go hand-in-hand.

  1. Brew MP sends the EVT_APP_SUSPEND event to the running application.
  2. If the application does not handle the EVT_APP_SUSPEND (i.e., returns FALSE), Brew MP sends EVT_APP_STOP to the application.
  3. When the call ends, Brew MP sends EVT_APP_RESUME or EVT_APP_START to the application, depending on whether the EVT_APP_SUSPEND was handled earlier.

When EVT_APP_SUSPEND is received, the application should do the following:

  • Cancel callback functions and timers.
  • Stop animations.
  • Release socket connections.
  • Unload memory intensive resources.

Note: Each carrier has different guidelines for how an application performs when it is suspended/resumed; refer to carrier guidelines for details.

For more information on suspend and resume, and other application management concepts, see the Application Management Technology Guide for Developers in on the Brew MP website.