0
我正在研究一个具有本地通知插件的科尔多瓦应用程序。我发现在这个混帐:https://github.com/katzer/cordova-plugin-local-notifications科尔多瓦本地通知单击事件参数为空
我有一个问题,当我运行通知的点击事件。正在发生的事件是正在触发事件,但参数通知和状态正在返回空。
通知被触发并且参数正确。我用过的日期过去了吗?
有没有人有同样的问题,并找到了解决办法?
cordova.plugins.notification.local.on("click", function (notification, state) {
if (notification.data == null || notification.data == undefined) { }
else if (notification.data.localeCompare('') == 0) {
} else {
}
}, this);
NotificationTemplate = function (sheduleTime, id, title, text, process,rowId) {
var sound = device.platform == 'Android' ? 'file://sound.mp3' : 'file://beep.caf';
cordova.plugins.notification.local.schedule({
id: id,
title: title,
text: text,
at: sheduleTime,
sound: sound,
data: { RowId: rowId, proc: process }
});
};
您的通知是如何构建的?你问题中的代码并没有真正告诉我们很多。 –