Best Practices for Seamless App Resumption After Restart with Windows Developer Blog

Posted by

Learn how to make sure your applications seamlessly resume after a restart and keep your app users happy with tips and best practices from Windows Developer Blog.

Help users resume your app seamlessly after a Windows update

Windows PCs require a restart to apply each month’s security updates. To help make sure applications seamlessly resume after a restart and keep app users happy, here are some tips and best practices.

Save the user’s state

If your app is documentation-focused, help people remember where in the document they were editing most recently. For image modification apps, consider saving their “undo” stack and/or creating a temporary copy of their workspace. For game developers, implement a quick “save” and ask players where they would like to resume.

Universal Windows Platform (UWP) apps

Universal Windows Platform (UWP) provides lifecycle management capabilities to applications. While a UWP app doesn’t need anything special to be restarted and resumed after a system update, it is recommended to save the app states periodically.

Win32 apps

Developers of Windows desktop apps can use the Application Recovery and Restart (ARR) APIs to register their app for restart. This helps applications cleanly close upon system restart and relaunch after restart with pre-defined arguments.

Resuming the previous workload

In addition to registering apps for restart, consider how an app can best resume its previous workload and recover the previous state. Common strategies include saving often to disk and providing context to resume state in the arguments used when registering via ARR API.

“Ultimately, your apps can offer seamless continuity following a restart – for updates or otherwise – by following a few best practices.”

By following these best practices, app developers can ensure their users have a seamless experience following a restart or update. With the right strategies in place, users will be able to pick up right where they left off.

  • Save the user’s state
  • Remember how their previous views were positioned
  • Relaunch the app following the update
  • Use UWP lifecycle management capabilities
  • Register your app for restart with ARR APIs

From the Windows Blog