使用Ionic.io Beta Push推动Android Push图标,声音和振动

时间:2016-03-22 20:55:57

标签: javascript ionic-framework

我正在使用我的应用程序从ionic.io alpha迁移到beta,我发现了一些奇怪的行为:

  1. 我在插件配置中设置的通知图标不再显示 当我收到通知时。 (如果我使用alpha API发送它 工作得很好)
  2. 手机不再播放通知 声音或振动(在alpha上工作正常)
  3. 我在通知接收时使用$ state.go和有效负载参数。使用 alpha API,当用户点击通知或接收通知时 在前台的应用程序,他被重定向就好了。使用te beta API只有在应用程序位于前台时才会被重定向。
  4. 这是我正在使用的代码:

    var push = new Ionic.Push({
            "debug": true,
            "onNotification": function(notification) {
              var payload = notification.payload;
              console.log(notification, payload);
              $state.go(payload['$state'],payload['$stateParams']);
            },
            "onRegister": function(data) {
              push.saveToken(token);  // persist the token in the Ionic Platform
            },
            "pluginConfig": {
              "android": {
                "icon": "push_icon",
                "iconColor": "#F47D30"
              },
    

    那么,有没有人遇到过类似的问题,或者可以帮我解决问题呢?

0 个答案:

没有答案