当应用程序停用并通过应用程序列表再次启动时,我应该启动新实例还是最后恢复?

发布于 2025-01-02 22:52:32 字数 539 浏览 0 评论 0原文

我阅读了很多有关应用程序状态、逻辑删除和推荐实践的内容,但我仍然感到困惑

这是我的场景

  • 用户通过应用程序图标启动应用程序。
  • 然后用户移动到下一页。
  • 用户单击 Windows 按钮。
  • 用户使用应用程序图标再次启动应用程序

这里会发生什么?

  • 我的第二页应该显示吗?因为用户没有通过后退按钮退出应用程序
  • 应该显示主页吗?因为用户通过应用程序列表启动它,这意味着

MSDN 说

新实例

确保当用户从“开始”启动您的应用程序时 或已安装的应用程序列表,用户将被带到一致的 启动体验。用户应该清楚地知道它们是 体验新的应用程序实例。

这是否意味着我应该再次启动主页而不是第二页?

如果是,只有当用户通过后退按钮访问我的应用程序并且触发 Application_Activated 事件时,我的应用程序状态才应该恢复(到第二页)吗?

I read a lot about application states, tombstoning and recommended practises but I am still confused

Here is my scenario

  • User launches app through application icon.
  • User then moves to next page.
  • User Click on Windows button.
  • User launches app again using application icon

What should happen here?

  • My second page should be displayed? because user didn't quit the app through back button
  • Main page should be displayed? because user launched it through app list which means new instance

MSDN says

Ensure that when your application is launched by the user from Start
or the installed applications list, the user is taken to a consistent
launch experience. It should be evident to the user that they are
experiencing a new application instance.

Does this mean that I should launch the main page again not second page?

If yes, should my app state only be restored(to second page) when user comes to my app through back button and Application_Activated event is fired?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

魂ガ小子 2025-01-09 22:52:32

您应该启动应用程序的新实例。

我相信这也是认证过程的一部分。

整个事情会变得非常复杂,因为确保应用程序在同一页面上使用相同数据打开的唯一方法是将整个状态保存到隔离存储中。

You should start new instance of application.

I believe this is also part of certification process.

And the whole thing would get quite complicated, because only way to ensure, that application is onpened on same page, with same data, is to save whole state into isolated storage.

没︽人懂的悲伤 2025-01-09 22:52:32

除非您正在做一些疯狂的自定义操作,否则应该为您处理此问题,因为停用过程支持页面导航。

如果用户返回您的应用程序,他们所在的最后一页将被恢复,并且PhoneApplicationService.Activated 将被引发(ActivatedEventArgs。如果您不需要取消保留状态,则 IsApplicationInstancePreserved 将为 true)。

如果用户从开始访问您的应用程序,则将加载应用程序的默认页面并PhoneApplicationService.Launching 将被引发。

Unless you're doing some crazy custom stuff, this should be handled for you as page navigation is supported by the deactivation process.

If the user backs into your application, the last page they were on will be restored and PhoneApplicationService.Activated will be raised (ActivatedEventArgs.IsApplicationInstancePreserved will be true if you don't need to unpersist your state).

If the user accesses your application from start, the application's default page will be loaded and PhoneApplicationService.Launching will be raised.

云朵有点甜 2025-01-09 22:52:32

我第一次展示的唯一内容是帮助或选项屏幕,以便新用户可以了解该应用程序。

从那时起,当应用程序启动时,它应该从用户想要使用的键/主页开始。

The only thing I would show first one time only is the help or options screen so a new user can get to know the app.

From that time on, when the app is started it should start with the key/main page that the user wants to use.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文