guys, now I'm developing a windows phone 8 app, I have an issue which is how to determine whether the app is returning from being dormant or tombstone ?
Thanks
Your app should check the IsApplicationInstancePreserved property of the event args to determine whether it is returning from being dormant or tombstoned. If IsApplicationInstancePreserved is true, then your app was dormant and state was automatically preserved by the operating system. If it is false, then your app was tombstoned and should use the state dictionary to restore application state.
This is the code for details
private void Application_Activated(object sender, ActivatedEventArgs e)
{
// Determine whether it is returning from being dormant or tombstoned.
// If it is false, return from tombstoned.
if (e.IsApplicationInstancePreserved == false)
//TODO
else
//TODO
}
Wish this can help you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With