设备没有使用离子推送获得推送通知

时间:2016-06-09 14:46:42

标签: javascript android ionic-framework hybrid-mobile-app

在我的app.js of ionic app中我有这个代码

angular.module('starter', ['ionic','starter.controllers','btford.socket-io'])

.run(function($ionicPlatform, $http,config) {
  $ionicPlatform.ready(function() {

    if (window.cordova && window.cordova.plugins.Keyboard) {
      cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
      cordova.plugins.Keyboard.disableScroll(true);

    }
    if (window.StatusBar) {
      StatusBar.styleDefault();
    }

      var push = new Ionic.Push({
      "debug": true
    });

    push.register(function(token) {
      push.saveToken(token);  // persist the token in the Ionic Platform
    });

  });

})

我推动离子推送终点,我得到的反应似乎没问题,看起来像http://pastebin.com/SjVicY4J

但我的设备从未收到通知。那太奇怪了。我不知道出了什么问题。

0 个答案:

没有答案