Hi,
We are using Capacitor Local Notification plugin in our application. When notifications are scheduled at certain time, there is some delay in receiving the local notifications. some times it takes 15 sec to 2 min of delay. The below is the code how we scheduled from code side. From code we are passing as a list and sending it to schedule function.
Code:
notificationList.push({
id: <ID>,
title:<TITLE>,
body: <BODY>,
smallIcon: <ICON>,
iconColor: <COLOE>,
schedule: { at: new Date(new Date().getTime() + snoozetime * 60000) }
});
Here snoozetime is a variable, it could be 1 min / 2 min / 5 min / 10 min
Below is the code for scheduling the notification:
LocalNotifications.schedule({notifications:notificationList}).then(result =>{
console.log("success");
})
} else {
console.log("failed");
}