Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Simulating tombstone (suspended state) on Windows Phone 7 emulator

DZone's Guide to

Simulating tombstone (suspended state) on Windows Phone 7 emulator

· Mobile Zone
Free Resource

Get gorgeous, multi-touch charts for your iOS application with just a few lines of code.

Since Windows Phone 7 doesn’t have multitask, at least for now, Microsoft implemented a Tombstone notion in WP7 apps.
It’s basically a suspended state where you receive a notification that it’s going to suspend but there is no guarantee that it will resume, it might be terminated so you must treat this as an exit and a might start again state.

So depending on you app you might want to save the current state just in case the app really closes.

Simulating this on the emulator took me awhile to get it right.

Press F5 on Visual Studio do start debugging your App.
Press the Start button and your app received a Deactivated event. Save what you need. Now, and here is the tricky part, the debugger also exited.
This took me awhile because pressing the back button wouldn’t do anything and pressing F5 again would just restart.

So you have to Press F5 and keep an eye on the compiler. When you receive a “Deploy Success” message

quickly press the Back button on the simulator

You app should now start and receive the Activated event.
Basically the debugger has to start between you pressing the Back button and before the black screen disappears otherwise the emulator while assume the app is closed and get back to home.

.Net developers: use Highcharts, the industry's leading interactive charting library, without writing a single line of JavaScript.

Topics:

Published at DZone with permission of David Amador, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}