![](/img/trans.png)
[英]IBM Worklight 6.1 - Tile badge from push notification never cleared on Windows Phone 8
[英]Toast for Push Notification on Windows Phone 8 using Worklight 6.1
我正在使用Worklight 6.1,并使用未经身份验证的过程将推送通知发送到Windows Phone 8。
我正在使用以下过程创建通知。 此过程将更新磁贴和徽章,但不会生成吐司通知:
WL.Server.createDefaultNotification(notificationText, badgeDigit, {custom:"data"});
WL.Server.createDefaultNotiication API方法仅返回Windows Phone 8的raw
和tile
通知类型。要添加toast
通知,请参见下面的示例。
var notification = WL.Server.createDefaultNotification("You have " + numCoupons + " coupons.", numCoupons, {foo: "bar"}); notification.MPNS.toast = {}; notification.MPNS.toast.text1 = "Toast title”; notification.MPNS.toast.text2 = "Toast content”;
要清除应用程序图标或图块中的WL.Badge
应使用WL.Badge
方法。 但是,在Worklight 6.1中, 此方法仅适用于iOS环境 (另请参阅此问题 )。
从Worklight 6.2开始, WL.Badge也适用于Windows Phone 8 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.