简体   繁体   English

Windows Phone 8中的通知

[英]Notification in Windows Phone 8

Can I use All notification in single Windows Phone App (Tile , Toast and raw )? 我可以在单个Windows Phone应用程序中使用“所有”通知(平铺,Toast和raw)吗? If yes then how ? 如果是,那怎么办? Is there any example or link which uses all these three notification? 是否有使用这三个通知的示例或链接? I have checked these links 我检查了这些链接

http://msdn.microsoft.com/library/windows/apps/hh202967(v=vs.105).aspx http://msdn.microsoft.com/library/windows/apps/hh202967(v=vs.105).aspx

http://msdn.microsoft.com/library/windows/apps/hh202977(v=vs.105).aspx http://msdn.microsoft.com/library/windows/apps/hh202977(v=vs.105).aspx

and also what is different between Toast and raw notification.? 以及Toast和原始通知之间的区别是什么?

Thank You 谢谢

Yes, you definitely can use all three types of push notifications. 是的,您绝对可以使用所有三种类型的推送通知。 Why not? 为什么不? You just need to union the needed code from toast , tile and raw notifications articles. 您只需要从toasttile原始通知文章中合并所需的代码。 The code is pretty much the same except a few strings. 除了几个字符串外,代码几乎相同。 You can merge it in one and you will get the app that uses all 3 types. 您可以将其合并为一个,然后将获得使用所有三种类型的应用程序。

The difference between Toast and Raw is that when app receives Toast message - it shows a 'toast' (Top-aligned popup with app icon and some text above the accent color). Toast和Raw的区别在于,当应用程序收到Toast消息时,它会显示一个“ toast”(带有应用程序图标的顶部对齐的弹出窗口,以及带有强调色的一些文本)。 As for wp8 - toast only shows itself when app is not active (not pretty sure about wp8.1). 至于wp8-烤面包仅在应用程序未激活时才会显示(不太确定wp8.1)。 You can also check whether toast came to your app from code and do some more actions. 您还可以检查是否从代码中获取了Toast,并执行了一些其他操作。 As for Raw message - you just can subscribe to receive it and make some actions manually in your code - show MessageBox, refresh some data and whatever. 至于原始消息-您只需订阅即可接收它并在代码中手动执行一些操作-显示MessageBox,刷新一些数据等等。 So it seems to me that Toast notification is improved version of Raw notification. 因此在我看来,Toast通知是Raw通知的改进版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM