Repeated local notification not working
See original GitHub issue-
Plugin version: cordova-plugin-local-notification 0.9.0-beta.2 “LocalNotification”
-
Platform: Android
-
OS version: 6.0.1
-
Device manufacturer / model: Samsung J5
-
Cordova version (
cordova -v
): 8.0.0 -
Cordova platform version (
cordova platform ls
): 7.0.0 -
Plugin config:
this.localNotifications.schedule({ id: notificationId, title: title, text: text, icon: “res://icon”, smallIcon: “res://notification”, color: ‘#000000’, every: { weekday: 5, hour: 18, minute: 37 } });
-
Ionic Version: 4.0.1
Expected Behavior
I need to schedule one repeatable local notification to every Friday at 19h.
Actual Behavior
I using your plugin in ionic (https://ionicframework.com/docs/native/local-notifications/) but the parameters to repeat notifications is different of docs. In my case, parameters same every
is a ELocalNotificationTriggerUnit
, not string (like your docs). I’m trying create a schedule and repeatable notification in all Fridays of weeks but, this not working because, the comments of plugin file not light my life to perfect understand a method to implement that.
I try to implement equals actual docs but, not working.
This is the parameters of ILocalNotificationTrigger
:
/**
* The date and time when the system should deliver the local notification. If the specified value is nil or is a date in the past, the local notification is delivered immediately.
* Default: now ~ new Date()
*/
at?: Date;
/** ***** TIMESPAN ***** */
/**
* Amount of units
*/
in?: number;
/**
* Unit
*/
unit?: ELocalNotificationTriggerUnit;
/** ***** REPEAT/MATCH ***** */
/**
* Amount of units
*/
count?: number;
/**
* The unit
*/
every?: ELocalNotificationTriggerUnit;
/**
* The end of the repeating notification
*/
before?: Date;
/**
* The date and time when the system should deliver the local notification. If the specified value is nil or is a date in the past, the local notification is delivered immediately.
* Only for "repeat"
* Default: now ~ new Date()
*/
firstAt?: Date;
/**
* Only for "match"
*/
after?: Date;
How i make that? Sorry for my mistake and thanks for your attention.
Issue Analytics
- State:
- Created 5 years ago
- Comments:7
Top GitHub Comments
Try:
Check this #1533