Archive for August, 2012

Windows Phone : Handling the lifecycle at two levels

weheartwp7

 

The sudden closure of the your software may trigger a series of issues, if you don’t handle these situations correctly. To make the user experience almost similar to what you would have if there would be a real multi threading it is important to handle the a couple of lifecycle event at two levels, the application level and the page level.

The application level includes the state of the entire application including everything that is not directly related to the visual aspect of the page. As an example, if you have a service running in a background thread, this may be have application-wide state that you need to save before tombstoning. For this purpose the runtime exposes four events that are raised during the phases of the tombstoning, during the startup and closing of the software. (more…)

read more

Windows Phone 7 : Application Life Cycle

Given that “there can be only one” application running at a ones time, it makes creating multitasking on mobile device can be a real hard-ass, the problems is  there are many ways the user can enter and exit the software. Navigating through application is something that exists also across the applications and when the user navigates he can enter the previous application if he follows the back button stack. Also, there can be a number of events that can impact the life cycle of the program. You have also to be aware that there is actions that suspend the software and other actions that simply close it definitively.  For example when user is playing a game on her/his phone when suddenly there is incoming call to her/his phone, higher priority of incoming call make the games halt for a while, but when user has ended with the call, they want to continue the game from the last time he/she was playing it, instead restart the game from begining.

Execution Model on windows phone has a complete cycle for us to manage application state. This execution model is designed to provide user with fast and responsive experiences every time user use the application. there are some term we must know before we learn about Application execution model of windows phone.

1. Tombstoning, a procedure where windows phone operating system will deactivate apps when user trigger close event or other higher priority application/service like Incoming Call make a request to start. Operating System will save state of Apps when it’s deactivated, and will be used when user restarting the application.
(more…)

read more