Phonegap的UrbanAirship即将到来

getIncoming in UrbanAirship for Phonegap

本文关键字:即将到来 UrbanAirship Phonegap      更新时间:2023-09-26

当我的手机收到推送通知,当我的应用程序被最小化时,如果我点击通知启动我的应用程序,调用

window.pushNotification.getIncoming( callback )

返回{"message":"","extras":{}},而不是我单击的通知的数据。

这是正确的行为吗?如果有,有什么方法可以得到我想要的信息吗?

使用下面的代码为PhoneGap推送通知

window.LocalNotification.add({
                    message : "hello",
                    ticker : "New Notification",
                    repeatDaily : false,
                    id : 4
                }, newNotification);

function newNotification(e) {
if (e != null && e.event == "newLocalNotification") {
    // add my Appointment page
    window.location = "#redirectPageId";
}

}

使用"redirectPageId"重定向页面