Ich arbeite an einer Cordova-Anwendung, die ein lokales Benachrichtigungs-Plugin hat. Was ich an diesem Git gefunden: https://github.com/katzer/cordova-plugin-local-notificationsCordova lokale Benachrichtigung klicken Ereignisparameter sind leer
Ich habe ein Problem, wenn ich das Click-Ereignis einer Benachrichtigung ausführen. Was passiert, ist, dass das Ereignis ausgelöst wird, aber die Parameter Benachrichtigung und Status leer sind.
Die Benachrichtigung wird ausgelöst und die Parameter sind korrekt. das Datum, das ich benutzt habe, war in der Vergangenheit, könnte es das sein?
Hat jemand das gleiche Problem und hat eine Lösung dafür gefunden?
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 }
});
};
Wie wird Ihre Benachrichtigung aufgebaut? Der Code in Ihrer Frage sagt uns nicht viel. –