With Mango, the Windows Phone application life cycle changes, and that is a good thing, because the change allows for Fast Application Switching (FAS). With FAS, the user can start a new application and then return to your application without seeing the “resuming…” screen and without a discernable pause.
Getting ready for FAS is the most important step you can take, because FAS will make your application more responsive. But you only get this extra responsiveness if you test whether you are returning from the Dormant vs. the Tombstoned state.
Most of the time you’ll be returning from the Dormant state, so this is well worth doing.
You only need to do this test if your code restores application state in response to the Application_Activated event. In that case, be sure to add a test to see if you are returning from Dormant (rather than from Tombstoned) by testing the IsApplicationInstancePreserved flag,
private void Application_Activated( object sender, ActivatedEventArgs e) { if ( e.IsApplicationInstancePreserved ) { // do not restore application state } else { // restore application state } }
If you are returning from Dormant state, the IsApplicationInstancePreserved flag will be true, and you do not have to and do not want to restore state; your state is intact. Not restoring state under these conditions will make your application much more responsive when the user switches away and then switches back.
WhatsApp BlackX 2014 is in staat om alle gebruikers
van Whatsapp te hacken.
tikeshwar