Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Delay in receiving local notifications #7817

Open
1 of 3 tasks
Karthikeya-G01 opened this issue Dec 24, 2024 · 0 comments
Open
1 of 3 tasks

[Bug]: Delay in receiving local notifications #7817

Karthikeya-G01 opened this issue Dec 24, 2024 · 0 comments
Labels

Comments

@Karthikeya-G01
Copy link

Karthikeya-G01 commented Dec 24, 2024

Capacitor Version

💊 Capacitor Doctor 💊

Latest Dependencies:

@capacitor/cli: 6.2.0
@capacitor/core: 6.2.0
@capacitor/android: 6.2.0
@capacitor/ios: 6.2.0

Installed Dependencies:

@capacitor/cli: 6.2.0
@capacitor/android: 6.2.0
@capacitor/ios: 6.2.0
@capacitor/core: 6.2.0

[success] iOS looking great! 👌
[success] Android looking great! 👌

Other API Details

npm --version Output: 10.7.0
node --version Output: 20.15.1
pod --version Output: 1.15.2

Platforms Affected

  • iOS
  • Android
  • Web

Current Behavior

We using Capacitor Local Notification plugin in mobile 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.

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");
                }

NOTE: Application is in foreground still didn't receive notifications

Expected Behavior

Local Notifications should be trigger at the scheduled time.

Project Reproduction

.

Additional Information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant