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.
Event | Object | Method |
Application launched. | UiApplication | main( String[] args ) |
OS tells application to start. | MainScreen | activate() |
Screen is pushed onto stack. | MainScreen | onDisplay() |
Screen about to be drawn. | MainScreen | onUiEngineAttached() |
Menu or dialog is removed. | MainScreen | onExposed() |
Screen is closed. | MainScreen | close() |
OS puts application in background. | UiApplication | deactivate() |
- 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
转自: