1

通知を機能させようとしていますが、受信していません。phonegap ビルドで pushwoosh を実装するためのチュートリアルに従いました。Google からアプリ 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;   

このコードをインデックス ファイル内のタグに挿入しまし<script>たが、デバイスはこの問題の原因を登録しませんか?

また、javascript フォルダー内に pushwoosh.js ファイルがあり、.jsファイルの参照タグでそれを指していることにも言及する必要があります。

4

0 に答える 0