IBM工作灯:推送通知和徽章 [英] IBM Worklight: Push Notification and Badge

查看:244
本文介绍了IBM工作灯:推送通知和徽章的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


  1. 在测试工作灯推送通知为Android,如果警报(通知消息)是空的,与应用程序名称的应用程序图标将没有任何通知消息将显示在通知栏。

    我想知道,如果警报iOS中是空的工作灯将如何处理这种情况?将在通知警告提示?问这样的原因是,我想只是无需启动一个警告框来更新徽章号码,如果有来自即使应用程序被关闭服务器更新。


  2. 请问徽章推送通知是否适用于iOS的唯一而不是使用Android?由于文件<一个href=\"http://pic.dhe.ibm.com/infocenter/wrklight/v5r0m6/index.jsp?topic=%2Fcom.ibm.worklight.help.doc%2Fapiref%2Fr_method_wl_server_notifyalldevi.html\"相对=nofollow>这里说:
    GCM
    警报
    可选。将显示在该警报的字符串。
    徽章
    强制性的。在应用程序图标徽章要显示的整数值。

    但在我的测试中,没有出现徽章Android应用程式。


  3. 请注意,是设置徽章(WL.Badge.setNumber)数的API或我可以将其设置在推送通知API(WL.Server.Notifyxxx - notificationOptions)。
    我能获得徽章的数量目前正在做增量而不是数字只设置呢?


环境:工作灯5.0.6,三星Galaxy S3的Andr​​oid 4.1.1

谢谢!


解决方案

  1. 如果没有您的通知发送文字,iOS设备将不会显示警报(横幅或模式对话框,这取决于用户选择的在Settings.app通知部分应用程序)。它只会发出声音,如果你选择这样。

  2. 徽章支持只适用于iOS。我将有徽章挂在嘴边从信息中心的文章删除。谢谢你。

  3. 目前还没有API来获取徽章的当前数目。与此同时,也许你可以使用科尔多瓦插件获得应用程序图标徽章的当前值。

  1. On testing Worklight push notification for Android, if the alert (notification message) is empty, the app icon with app name will be displayed in notifications bar without any notification message.

    May I know how Worklight will handle this case if alert is empty in iOS? Will the notification alert be prompted? The reason to ask so is that I would like to update the badge number only without launching an alert box if there is update from server even though the app is closed.

  2. May I know whether badge in Push Notification is applicable on iOS only but not Android? As the document here said that:
    "GCM alert Optional. A string to be displayed in the alert. badge Mandatory. An integer value to be displayed in a badge on the application icon." But on my testing, there is no badge appeared for Android app.

  3. Notice that there is an API to set the number of badge (WL.Badge.setNumber) or I can set it in Push Notification API (WL.Server.Notifyxxx - notificationOptions).
    Can I get the number of badge currently to do increment instead of just setting a number to it?

Environment: Worklight 5.0.6, Samsung Galaxy S3 Android 4.1.1

Thanks!

解决方案

  1. Without sending text with your notification, iOS will not display an alert (banner or modal dialog, depending on what the user chooses for the app in the Notifications section in Settings.app). It will only make a sound, if you choose so.
  2. Badge support is for iOS only. I'll have the "badge" mention removed from that Information Center article. Thanks.
  3. There is currently no API to get the current number of badges. In the meanwhile, perhaps you can use a Cordova plug-in to get the current value of the app icon badge.

这篇关于IBM工作灯:推送通知和徽章的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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