开发者

Will I still need tombstoning in Mango?

With multi-tasking enabl开发者_如何学JAVAed, can I safely throw away tombstoning when porting my project to Mango?


Fast app switching is where the app is deactivated, but is not tombstoned. It now goes into a dormant state. If memory is required, the app may be tombstoned from this dormant state. If the app is activated and it is in the dormant state, it is merely activated and continues running as if nothing really happened (you will need to reconnect any sockets, re-acquire the camera, etc if required). If the app was tombstoned, it goes through the same re-activation as apps currently do.

Multitasking where is the new background agents come into play. Background agents are a separate assembly distributed with your app that can be set to run while your app is not running. They will get 15 seconds of execution time every 30 minutes (as long as those figures haven't changed since the announcement at MIX11) for up to two weeks.

From here.

Also: From Tombstoning to Fast Application Switching

Will I still need tombstoning in Mango?


The answer is an absolute YES!

Tombstoning does not go away in Mango, it just becomes less likely that your app will be tombstoned.

For Mango you just do everything as you did before regarding tombstoning, however you additionally need to check the IsApplicationInstancePreserved property to determine if you should restore state.


After reading the Mitch's great answer and provided links, I will dare to say that yes, for many applications and if your application is average in memory consumption, you can skip on implementing tombstoning in Mango. The reason is that tombstoning is needed when user leaves your application for search or to run another app or to take a call or lock the screen and comes back right after these events. In these situations he still remembers where he was and not restoring the state would throw him off.

But, if user comes back to the application after 2 hours and running 5 other apps, the expectation is that your app would be on its home page, and showing the same state where he left the app could be even irritating. After all, if he wanted to see the state, he would come back earlier ;)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜