WARNING: IF YOU IGNORE THIS TEMPLATE, WE'LL IGNORE YOUR ISSUE. YOU MUST FILL THIS IN!
Provide a general summary of the issue.
The notification shows once I install the app but then on a swipe of notification it appears again also app won't open on tap and then after a minute it crashes.
cordova -v): 9.0.0cordova platform ls): android 8.1.0_Tell us what should happen_
After installing the app, Array of given notification should appear every day at a given time. I should be able to remove the notification on swipe and should also be able to open the app on tap of the notification.
The notification doesn't go when I clear the notification panel. My app doesn't open on tap. App crashes after a minute.
_Reproduce this issue; include code to reproduce, if relevant_
onDeviceReady() {
// Now safe to use device APIs
if (window.cordova) {
alert("device ready");
let cordovaPlugin = cordova.plugins;
cordovaPlugin.notification.local.schedule([
{
id: 0,
title: "Remind",
text: "Remind me to drink water.",
trigger: {
every: {
hour: 17,
minute: 36
}
}
},
{
id: 1,
title: "Remind",
text: "Buy Milk",
trigger: {
every: {
hour: 17,
minute: 34
}
}
}
]);
}
}
I am trying to create a reminder for everyday but different timings.
eg:
no issue on logs compiles successfully.
_Include iOS / Android logs_
No error logs observed.
Yeah, I had the same issue and opened it a couple of months ago and I never received any answers.
Yeah, I had the same issue and opened it a couple of months ago and I never received any answers.
Yeah I guess the project is not maintained anymore. Are you aware of any other similar cordova plugin.
Faced the same problem.
I found out that the notification is not hiding because it is not one notification, but infinity. Until the minute runs out, notifications appear again if you hide them.
A possible solution is to specify not only minutes, but also seconds in the every parameter. Crutch, but it seems to work.
Found this issue after switching from 3 ionic to 5
Specifying seconds in every didn't help. But I noticed that the notification is forcibly displayed for a minute, and then disappears automatically.
That is, the behavior of the notification is completely inconsistent with the old behavior. It is not known what the matter is, in the plugin, or in the android, we need to look for workarounds
hi all, perhaps you can try this fork, it is more recent and still maintained:
https://github.com/timkellypa/cordova-plugin-local-notifications
hope it helps. thanks.
Guys, I sat all day and came to the following conclusion.
Cordova notifications work so-so and for reliability it is better to use the most typical simple designs.
In my case, notifications need to be sent daily at 21:00. "Trigger every" does not work. It worked for me for ionic 3, but after switching to ionic 5 it began to get stuck like yours.
Solution: in a loop, create several "trigger at" notifications for the required dates, instead of one with "trigger every".
For me, it's enough to create notifications 10 days in advance and update these notifications every time the application is launched. To update, it is enough with these 10 notifications to put down the same ID every time.
But for some reason, even ordinary notifications are not shown every time. I don't know what to do, probably let it be as it is.
UPDATE: This xiaomi blocks simple notifications, everything is working
Most helpful comment
hi all, perhaps you can try this fork, it is more recent and still maintained:
https://github.com/timkellypa/cordova-plugin-local-notifications
hope it helps. thanks.