I wanna set trigger at a specific time for every day, so tried below code which doesn’t work.
this.localNotifications.schedule({
id: 1,
title: 'asdf',
text: 'asdf',
trigger: {
every: ELocalNotificationTriggerUnit.DAY,
firstAt: new Date(new Date().getTime() + 3600)
}
});
But when i use only “firstAt” or “every: ELocalNotificationTriggerUnit.MINUTE” it works.
Please help me !!!
izio38
June 12, 2018, 3:56pm
2
If you want to target iOS platform, please, do not use firtAt since it’s not availible in iOS.
Source : https://github.com/katzer/cordova-plugin-local-notifications
But if i use only ‘firstAt’ it works in iOS.
How should i schedule a notification at a specific time for every day ?
Still I’m struggling.
izio38
June 13, 2018, 6:14am
4
If it works… That’s weird but why not…
Maybe this is a non-sense, but have you tried to set the firstAt before the every? Which makes more common sense?
I just tried it but didn’t work.
izio38
June 13, 2018, 8:18am
7
you could use : trigger: { in 2, every: 2, unit: 'hour' }
It will trigger in 2 hour and then every 2 hours
It works this way woth the official plugin, not sure about Ionic Native implementation : https://github.com/ionic-team/ionic-native/blob/master/src/%40ionic-native/plugins/local-notifications/index.ts
Type of ‘every’ and ‘unit’ is ‘ELocalNotificationTriggerUnit’, they don’t accept integer or string value.
Have you resolved this? I’m struggling with the same issue
nope, i gave up to use it
No one has figured out a work around for a repeatable notification with a delayed start on iOS? There must be a way to do the “firstAt” + “every” combination with a different solution…