Tombstoning in Windows Phone 7
Again with the whole tombstoning thing. In Arizona there is a city by the name of Tombstone, https://www.cityoftombstone.com/, sometimes referred to as the town that wouldn’t die. This is somewhat similar to your phone app, you don’t want it to die if the user receives a phone call right?
So what is tombstoning and how can you get up to speed quickly, without reading anything and basically skipping my usual drivel.
Tutorial on Tombstoning in Windows Phone 7.1 can be found at:
Why Tombstoning?
See: https://msdn.microsoft.com/en-us/library/ff817008(v=VS.92).aspx, where you will see the image below, note the large circle named “tombstone”, you have three big circles, so that means each one is important and you should have specific knowledge about what each one does. Or be able to fake it, your choice. So we are talking about Tombstoning because it is the most difficult to fake while in a conversation with someone, and if you can speak with knowledge about it, hiring managers might be impressed. Might not be impressed if you are faking it and they figure that out, so logically you should be able to know tombstoning so well that you incorporate it into every project you make. This can be difficult and not a lot of fun for the first 10 or so projects. Then is still isn’t fun, but you just do it.
Tombstoning can be specified with the following (from the link above):
-
- A tombstoned application has been terminated, but information about its navigation state and state dictionaries populated by the application during Deactivated are preserved.
- The device will maintain tombstoning information for up to five applications at a time.
- If an application is tombstoned and the user navigates back to the application, it will be relaunched and the application can use the preserved data to restore state.
- Otherwise, the application is simply terminated.
What if the app is app number 6?
- In this case you will need to have implemented “isolated storage”, which I will cover sometime in the past, but for now there are a number of good articles and tutorials about how to use Isolated Storager.
Run the sdkExecutionModelCS sample and test it
- Run the sdkExecutionModelCS project
- Make some changes to the page so that you can observe how Tombstoning works.
- Start the program and wait for the emulator to start
- Click the backbutton (on the emulator)
- Open Internet Explorer
- Click the backbutton until you are back in the application, the state of the page should be the same
Now use the start button
- Click the Start Button
- Click back into the app, without using the backbutton on the emulator, navigate to the app, by clicking on the arrow in a circle at the top right of the screen
- You should have none of your changes preserved, this is because you launched a new app instance
This is a simple process to give you a quick heads up on how Tombstoning works, also if you have an app that you own, then you will need to specify testing of tombstoning if you are using it.