没有收到PushNotification(pushwoosh)

时间:2014-03-01 18:11:38

标签: android cordova pushwoosh

我已根据文档成功实施了所有内容,并使用pushwoosh注册了我的设备:

enter image description here

并且代码是:

<script>

document.addEventListener("deviceready", onDeviceReady, false);
var pushNotification;
function onDeviceReady() {  
pushNotification = window.plugins.pushNotification;
pushNotification.register
(successHandler, errorHandler,{"senderID":"10524986381","ecb":"onNotificationGCM"});    

}
function onNotificationGCM(e) {
switch( e.event )
{
    case 'registered':
     if ( e.regid.length > 0 )
     {

         PushWoosh.appCode = "F653A-0888C";
         PushWoosh.register(e.regid, function(data) {
                     alert("PushWoosh register success: " + JSON.stringify(data));
                 }, function(errorregistration) {
                     alert("Couldn't register with PushWoosh" +  errorregistration);
                 });
    }
     break;
       }
  }
 function successHandler (result) {
   }
  function errorHandler (error) {
   }
</script>

但遗憾的是,一旦发送,我无法在设备上收到PushNotifications。

请帮助,谢谢!

0 个答案:

没有答案