![](/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.