【发布时间】:2014-04-03 23:19:34
【问题描述】:
我将 Cordova Push Notifications Plugin 1.3.4 与我的 Cordova/Phonegap 应用程序一起使用。不幸的是,当收到推送通知时,我的 JavaScript 中的 ecb 回调从未被触发,我无法处理推送通知(即使应用程序在前台运行时也无法处理)。
我正在使用演示中的example code:
pushNotification.register(tokenHandler, errorHandler, {"badge": "true", "sound": "true", "alert": "true", "ecb": "onNotificationAPN"});
注册成功,但从未触发以下回调:
function onNotificationAPN (event) {
if (event.alert)
{
navigator.notification.alert(event.alert);
}
}
【问题讨论】:
标签: cordova phonegap-pushplugin