1

このプラグインで PhoneGap ビルド + jQuery Mobile (1.4+) を使用しています: http://www.pushwoosh.com/programming-push-notification/ios/ios-additional-platforms/push-notification-sdk-integration-for-フォンギャップ/

「JSON」として送信されるカスタムデータでjQueryモバイルURL(例#test)を送信できるようにしたいのですが、私にとってはすべてうまくいきますか?次に、jQuery Mobile がアプリに jQuery ページを読み込みます。

誰かがこれを実装する方法を教えてもらえますか? この段階で私は持っています:

//push notifications handler
document.addEventListener('push-notification', function(event) {
            var notification = event.notification;
            // navigator.notification.alert(notification.aps.alert);

            //to view full push payload
            // navigator.notification.alert(JSON.stringify(notification));

            //reset badges on icon
            pushNotification.setApplicationIconBadgeNumber(0);
          });

http://www.pushwoosh.com/programming-push-notification/pushwoosh-push-notification-remote-api/

彼らの例は {"key" : "value"} なので、私が {"url" : "#test"} であると仮定します

ありがとう、ベン

4

1 に答える 1

0

これがまだ関連していることを願っています(または将来の検索のために)、notification.uオブジェクトからデータを取得できます

例:

if( typeof(notification.u.url) != "undefined" ) {

    // do whatever here

    }
于 2014-07-25T12:55:21.413 に答える