【问题标题】:Push notifications (home badges) supported by PhoneGap?PhoneGap 支持推送通知(家庭徽章)吗?
【发布时间】:2011-11-11 11:10:53
【问题描述】:


我已经阅读了 phonegap 的文档,说它支持一些推送通知功能 http://wiki.phonegap.com/w/page/37159628/Notifications
我可以知道是否可以使用 PhoneGap 进行“家庭徽章”推送通知?

【问题讨论】:

    标签: mobile cordova push-notification push


    【解决方案1】:

    我不确定您是否正确,但这可能对您使用 android 有所帮助。

    Link to android push notification

    我自己没有尝试过,但我正在寻找使用 phonegap 的 iphone 的家庭徽章方法

    【讨论】:

      【解决方案2】:

      Cordova Push Notifications Plugin 是可能的。

      此插件为您提供了一个方便的推送通知回调,您可以在其中相应地设置应用程序图标徽章,例如:

      //push notifications callback function
      function onNotificationAPN (event) {
          //handle push message
          if (event.badge) //a badge number is provided in the push message
          {
              //set the application icon badge number accordingly
              pushNotification.setApplicationIconBadgeNumber(successHandler, errorHandler, event.badge);
          }
      } 
      

      【讨论】:

      • 是的,但这仅适用于 iOS。到目前为止,似乎还没有对 Android 的支持,当然,他们“只”拥有 86% 的市场份额......
      猜你喜欢
      • 2012-08-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-06-24
      • 2011-09-19
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多