I've got a Windows Store App that need to save data on Suspending
. Everything works fine except when
- The user close the app (using e.g. alt+f4 or close gesture) ...
- ... and then restarts the app within 10 seconds.
In this case the Suspending
-event is not fired (so no data is saved) and at the same time the app is restarted without any previous state (previous state in OnLaunched
is NotRunning
) so the app must reinitialize everything.
How can state be preserved between these "user sessions"?