您的位置:首页 > 移动开发

5). BlackBerry生命周期- BlackBerry Application Life-Cycle and Phasesby

2012-01-30 14:24 591 查看
BlackBerry Application Life-Cycle and Phasesby

The runtime lifecycle defines a common runtime architecture that is the same for all apps. This makes mobile apps much easier to design, and means that you don't have to worry about complex interactions with the system; critical system interactions are already built into the lifecycle.



Following are the events which used in order while your application will move through.

EventObjectMethod
Application launched.UiApplicationmain( String[] args )
OS tells application to start.MainScreenactivate()
Screen is pushed onto stack.MainScreenonDisplay()
Screen about to be drawn.MainScreenonUiEngineAttached()
Menu or dialog is removed.MainScreenonExposed()
Screen is closed.MainScreenclose()
OS puts application in background.UiApplicationdeactivate()
The BlackBerry Tablet OS is a multithreaded, multitasking platform so it can run multiple applications at the same time. While your application is running in the foreground, it is active. However, it can be interrupted when another application opens and replaces yours as the active application
These events can be fire into three main phases in a BlackBerry application runtime life-cycle:

Startup : startup is generally done by one of the following three ways

- User clicks the application's icon on the home screen.

- Application is automatically started when device is turn on.

- The application is run by another application.

Running

Exiting
转自: http://www.mindcracker.com/Story/392/blackberry-application-life-cycle-and-phases
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: