Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/http/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
尝试在PhoneGap构建(Android)上实现Pushwoosh_Android_Push Notification_Phonegap Build - Fatal编程技术网

尝试在PhoneGap构建(Android)上实现Pushwoosh

尝试在PhoneGap构建(Android)上实现Pushwoosh,android,push-notification,phonegap-build,Android,Push Notification,Phonegap Build,我试图让我的通知工作,但我没有收到他们。我按照教程在phonegap构建中实现pushwoosh。我有谷歌提供的应用ID和API密钥,但在我重新安装应用时,我没有让应用所在的设备注册 我猜我的问题在以下代码中: // handle GCM notifications for Android function onNotificationGCM(e) { switch( e.event ) { case 'registered': if ( e.regid.length

我试图让我的通知工作,但我没有收到他们。我按照教程在phonegap构建中实现pushwoosh。我有谷歌提供的应用ID和API密钥,但在我重新安装应用时,我没有让应用所在的设备注册

我猜我的问题在以下代码中:

// handle GCM notifications for Android
 function onNotificationGCM(e) {
 switch( e.event )
 {
     case 'registered':
     if ( e.regid.length > 0 )
     {
         // Your GCM push server needs to know the regID before it can push to this device
         // here is where you might want to send it the regID for later use.
         PushWoosh.appCode = "YOUR_PUSHWOOSH_APP_ID"; // my pushwoosh id is here
         PushWoosh.register(e.regid, function(data) {
                     alert("PushWoosh register success: " + JSON.stringify(data));
                 }, function(errorregistration) {
                     alert("Couldn't register with PushWoosh" +  errorregistration);
                 });

     }
     break;   
我在索引文件中的
标记中插入了此代码,但设备未注册导致此问题的原因

我还应该提到,我的javascript文件夹中有pushwoosh.js文件,我在
.js
文件的引用标记中指向它