确定当Windows 8应用被启动的通知 [英] Determine when a Windows 8 app is launched by Notification

查看:135
本文介绍了确定当Windows 8应用被启动的通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须通知要我的申请,我希望能够将用户带到该网页在我的应用程序时,他们点击通知或动态磁贴(当前显示的项目)。

I have notifications going to my application, I want to be able to take the user to that page in my application when they click on the notification or live tile (current displayed item).

有没有办法来判断你的应用程序从一个Live平铺或Toast通知推出的瓦片数据是什么?

Is there a way to determine what the tile data is when your app is launched from a Live Tile or Toast Notification?

此外,用户有能力右击现场瓷砖和关闭它。有没有一种方法来检测这样我就可以关掉把他们住的瓷砖还是WNS处理这个问题?

Also, users have the ability to right click on a live tile and turn it off. Is there a way to detect that so I can turn off sending them live tiles or does WNS handle that?

谢谢!

推荐答案

Windows不提供一种方法来确定瓷砖的内容,当用户通过平铺启动应用程序。按照UX指南从以下每发射应该有相应的行为:

Windows does not provide a way to determine the tile content when a user launches the app via a tile. Per the UX guidelines launching from each of the following should have the corresponding behavior:


  • 主要瓦:应用程序应启动到最后一个用户离开应用程序或应用程序主页的地方

  • 二次瓦:应用程序应启动在应用具体内容<。 / LI>
  • 吐司:像二次瓦,应用程序应启动在应用具体内容

  • Main tile: The app should launch to the last place the user left the app or the app home page.
  • Secondary tile: The app should launch to specific content in the app.
  • Toast: Like a secondary tile, the app should launch to specific content in the app.

所有三种类型的激活会导致 OnActivated 事件与的 IActivatedEventArgs.Kind 参数设置为 。Activati​​onKind.Launch

All three of types of activation will cause the OnActivated event to be fired with the IActivatedEventArgs.Kind parameter set to ActivationKind.Launch.

对于这两个二级瓷砖和敬酒激活,应用程序可以提供在的LaunchActivatedEventArgs.Argument 参数。

For both secondary tile and toast activations, the app can provide an additional context in the LaunchActivatedEventArgs.Argument parameter.

有关二次瓦,发射参数参数可以在创建的瓦通过的 SecondaryTile.Arguments 属性。

For secondary tiles, the launch arguments parameter can be set upon creation of the tile via the SecondaryTile.Arguments property.

有关敬酒通知,发射参数参数被设置为在Toast通知XML属性:

For toast notifications, the launch arguments parameter is set as an attribute in the toast notification XML:

<toast launch="myLaunchContext">
    ...
</toast>



最后,应用程序不应该需要检查是否瓦片已经由用户打开或关闭。 Windows和WNS将确定是否需要交付。用户可以开启/关闭,而应用程序无法运行,因此在应用中保存的状态可能是出于与设置同步的瓦。

Lastly, apps should not need to check whether the tile has been turned on or off by the user. Windows and WNS will determine whether delivery is required. The user can turn the tile on/off while an app is not running, so the state saved by the app may be out of sync with the setting.

这篇关于确定当Windows 8应用被启动的通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆