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: LocalNotification on repeats reminders every hour after first reminder #2747

Closed
1 of 4 tasks
dotrub opened this issue Apr 10, 2020 · 5 comments · Fixed by #3307
Closed
1 of 4 tasks

bug: LocalNotification on repeats reminders every hour after first reminder #2747

dotrub opened this issue Apr 10, 2020 · 5 comments · Fixed by #3307

Comments

@dotrub
Copy link
Contributor

dotrub commented Apr 10, 2020

Bug Report

Capacitor Version

npx cap doctor output:

@capacitor/cli 1.5.0

@capacitor/core 1.5.0

@capacitor/android 1.5.0

@capacitor/ios 2.0.0

Affected Platform(s)

  • Android
  • iOS
  • Electron
  • Web

Current Behavior

Set up a LocalNotification. I want to set up daily repeating reminders at a time the user has set. The on option seems best suited, so I collect a time, extract the hours and minutes, and set those values as on: { hour: ${time.hour}, minute: ${time.minute} }. At the scheduled time, the reminder triggers; I tap it and do what it wanted me to. An hour later, when the minutes of the time match the on field again, I get another reminder, even though the hour shouldn't match. I continue to get reminders for every hour after the original.

Worth noting that I tried to see if it was because hour wasn't being respected, by setting my reminder to about an hour before now and waiting for the minutes to match. The reminder does not pop up in this case; this bug is only present after the reminder has triggered the first time.

Expected Behavior

on should only trigger when all the fields match. If I set hour and minute, I expect the reminder to only fire when the hour and minute match.

Sample Code or Sample Application Repo

Not much code to provide for this one. Here's most of the reminder object I'm setting:

const reminder = {
    id: 100,
    schedule: { 
        on: {
            hour: 12,
            minute: 30,
        },
    },
};

With this reminder, my reminder triggers at 12:30pm, and then at 1:30pm, 2:30pm, and so on...

Reproduction Steps

Set a reminder like the one above and wait for it to trigger. Then wait an hour and see it trigger again.

Other Technical Details

npm --version output: 6.9.0

node --version output: v10.16.3

@IT-MikeS
Copy link
Contributor

I gave this a shot, and I wasn't able to reproduce this with a clean ionic start myApp tabs --type=react

@Ionitron
Copy link
Collaborator

It looks like this issue didn't get the information it needed, so I'll close it for now. If I made a mistake, sorry! I am just a bot.

Have a great day!
Ionitron 💙

@Ionitron Ionitron removed the needs reply needs reply from the user label Jul 24, 2020
@imhoffd imhoffd reopened this Jul 24, 2020
@imhoffd imhoffd linked a pull request Jul 24, 2020 that will close this issue
@imhoffd
Copy link
Contributor

imhoffd commented Jul 24, 2020

There's an open PR by @kheftel that fixes this, so I'll reopen.

@jcesarmobile
Copy link
Member

closing since the linked PR was merged. Should be fixed in 2.4.0

@ionitron-bot
Copy link

ionitron-bot bot commented Nov 11, 2022

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Nov 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants