windows-store-apps - 以编程方式重新启动 Windows 应用商店应用程序

标签 windows-store-apps winjs

我知道可以使用 MSApp.terminateApp 来终止该应用程序。重新启动应用程序怎么样?有没有重启的命令?

最佳答案

重新启动不符合 Windows 8 应用程序概念(以前称为 Metro)。如果您进入不可恢复的状态,那么正确的做法是让它崩溃并让 Windows 从那里处理它。

来自here :

App crash

Apps are required to follow the system crash experience, which is to simply return to the Start screen. The system crash experience is designed to get users back to what they were doing as quickly as possible, so you shouldn't provide a warning dialog or other notification because that'll cause a delay for the user. The disappearance of the app should make it clear to the user that something went wrong.

If your app crashes, stops responding, or generates an exception, Windows asks the user for consent to send a problem report to Microsoft. Microsoft provides a subset of the error data in the problem report to you so that you can use it to improve your app. You'll be able to see this data in your app's Quality page in your Dashboard in the Windows Dev Center for Metro style apps. (Note that you can't submit apps or view your app's data until the Windows Store opens for general submissions.)

When the user activates an app after it crashes, its activation event handler receives an ApplicationExecutionState value of NotRunning, and should simply display its initial UI and data.

关于windows-store-apps - 以编程方式重新启动 Windows 应用商店应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11962230/

相关文章:

javascript - WinRT - Javascript - 是否可以实现 FTP、SSH、SFTP 等?

c# - 如何在 Windows 应用商店 XAML/C# 应用程序中播放音频剪辑

c# - gridview 中的 Windows 8.1 选择模式

c# - Windows 商店应用程序 ScrollViewer.ChangeView() 不工作

javascript - 如何将任何格式的字节数组内容数据保存到winjs中的文件中并保存到Windows平板电脑中的本地文件夹

javascript - 从数组 winjs 更新 ListView 中的分数

c# - 为什么图像在我的按钮内仅部分可见?

windows-8 - 我的应用程序的试用用户可以使用我的应用程序内购买吗?

microsoft-metro - 监听 ListView 上的点击事件

javascript - 互联网连接错误消息 - 使用 Javascript 的 Windows 8 应用程序