Open Eolus opened 7 years ago
+1 This is really unfortunate.
@EddyVerbruggen Is this going to be addressed? Right now, I have to cancel all notifications and regenerate all of them just to change/cancel one.
Don't know if this will be fixed. Does the upstream repo have a ticket open like this? It gets a lot more exposure so it's better to ask the question there imo.
@keithdmoore @Eolus I just tried with 0.8.4.1 and all of these seem to work as expected:
function schedule() {
cordova.plugins.notification.local.schedule({
id: 1,
title: "Hey there",
text: "Got the message?",
every: "minute",
at: new Date(new Date().getTime() + 10*1000) // 10s from now
});
}
function cancel() {
cordova.plugins.notification.local.cancel([1], function(){alert('cancelled')});
}
function getScheduledIds() {
cordova.plugins.notification.local.getScheduledIds(function (scheduledIds) {
alert(scheduledIds.join(', '), null, 'Scheduled Notification ID\'s', 'Close');
});
}
function getTriggeredIds() {
cordova.plugins.notification.local.getTriggeredIds(function (triggeredIds) {
alert(triggeredIds.join(', '), null, 'Triggered Notification ID\'s', 'Close');
});
}
Can you give me a bit of code that reproduces the problem?
On an actual iOS 10 device?
Actual 9 and 10 indeed
I am having trouble with
notification.local.getScheduledIds() notification.local.getAllIds() notification.local.getIds() I am able to schedule notifications with: notification.local.schedule(). The problem is that the 3 previously mentioned id getters do not seem to return any ids.
I am testing on iOS 10.1 iPhone 6, using Cordova.
I may have spoken too soon re Issue #16 regarding iOS 10 support. 0.8.4.1 allows me to schedule and receive notifications and to cancel them with the cancelAll() or clearAll() command, which is my most common usage case. Any command that requires querying notifications or operating on a single notification (e.g. getAll(), getAllIds(), get(1, CB), cancel(1, CB), etc.) does NOT work, however, returning a null result. My app uses three different types of notifications and I have a number of less common situations where I need to cancel or update 1 of the 3 (but NOT the other 2) already triggered notifications whose id I know. There does not seem to be any working commands that allow this. Ideas?