Model
execution on a Windows Phone has a complete cycle, from when the application is
launched until it is deactivated.
Several
terminologies we should get familiar with in order to understand the aspects of
execution model on Windows Phone application.
1.
TombstoningA procedure in which the operating system deactivates the application process as users exits the application. Operating system preserves any information about the application’s state. When the application is re-launched, the operating system restarts the process and sends the last known state from before the application was turned off.
2. Page State
A state regarding the application page. It includes scroll positions or text field contents. Modifications to this state is done by overriding OnNavigatedTo or
OnNavigatedFrom methods.
3. Application state
An application’s condition in which there are no specific associations to any page. This condition can be modified using PhoneApplicationService class.
4. Persistent data
Data shared by application. This data is stored and retrieved from isolated storage. Application setting is one example of persistent data.
5. Transient data
Transient data are those related to an instance of the application. Transient data is stored in state dictionary provided by PhoneApplicationService. An application in tombstoned state will return to transient condition when application is reactivated. An example of transient state is web service query.
Application
lifecycle in window phone have five stage:
1. LAUNCHING2. RUNNING
3. CLOSING
4. DEACTIVATING:
5. ACTIVATING
Application Lifecycle |
This
is the list of actions that will cause an application to enter tombstoned
condition:
- WebBrowserTask
- MarketplaceDetailTask
- MarketplaceHubTask
- SaveEmailAdressTask
- SavePhoneNumberTask
- SearchTask
- SmsComposeTask
The
following actions will not automatically cause application to enter tombstoned
condition, and thus should be handled:
- PhotoChooserTask
- CameraCaptureTask
- MediaPlayerLauncer
- EmailAdrdressChooserTask
- PhoneNumberChooserTask
No comments:
Post a Comment