You are developing a Windows Store app. The app is a personal diary that will allow users to
add multiple journal entries while they are logged in. Users will be able to switch to other
apps and then return to the diary app.
You need to ensure that the diary app maintains state when the user switches between apps
or restarts the device on which the app is running.
What should you do?
A.
Save app state periodically and during the Suspending event and then restore state
during the OnLaunched event.
B.
Save app state during the Suspending event and then restore state during the Resuming
event.
C.
Save app state periodically and then restore state during the Resuming event.
D.
Save app state periodically and during the Suspending event and then restore state
during the OnActivated event.
The right options is ‘D’ I think, because, when you switch between different apps, OnActivated event is raised.
OnLaunched event only is raised when you launch the app normally..so it does not meet every requirement.
NOP, A ==> “or restarts the device on which the app is running.”
If you switch between different apps, you can use Cache