Responding to application deactivation and activation
The BlackBerry® Tablet OS is a multitasking operating system, which means that your application can be deactivated and moved to the background at any time. Sometimes, this is user initiated, such as when the user actively leaves your application to open another application. However, a loss of focus can also be initiated by the system, or by another application. In any case, you cannot assume that the user has appropriately saved their activity in your application before it moves to the background.
When your application is deactivated and pushed to the background, it is important that it first saves its state. It is also important that your application stop any unnecessary processes to preserve system resources, to avoid needlessly using system resources and risking low memory conditions. When the application is activated and returns to the foreground, it can reload the saved state, and restart any stopped processes.
Each time your application transitions from the foreground to the background and back again, theNativeApplication object, which represents the application for the duration of the life cycle and which is instantiated automatically when the application is invoked, dispatches one of the following events:
No comments:
Post a Comment