question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

LocalNotifications: add second option to on pattern

See original GitHub issue

The following code triggers a local notification, every day at 22:55

        schedule: {
          on: {
            hour: 22,
            minute: 55
          }
        }

The problem is this that when the user receives the notification at 22:55:00 and he immediately taps on it, he gets another notification, because the on pattern matches the time during 22:55:00 and 22:55:59. If the user is fast with tapping he receives multiple notifications during that minutes.

I think this behavior is not wrong, because the pattern matches the time. But I think we need a way to also specify the seconds. This would solve the problem and the notification only appears once a day.

        schedule: {
          on: {
            hour: 22,
            minute: 55
            second: 0
          }
        }

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:12 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
dotrubcommented, Apr 8, 2020

@mrowe009 Count is for every; if you specify every: day and count: 2, it will repeat every 2 days.

I’m having the same issue. I tried passing in second anyway since the Android code looks like it doesn’t care, but that did nothing. This makes on completely useless.

1reaction
ralschacommented, Nov 12, 2019

No I haven’t. I was just exploring the capabilities at that time.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Swift Local Notifications 2: Time Interval Notfications - YouTube
This is the second in a series of videos on scheduling an responding to local notifications in swiftIn this video our focus will...
Read more >
Local Push Notifications with .NET MAUI, Easy With This Plugin!
With the Plugin. LocalNotification for .NET MAUI, adding local push notifications to your app has never been easier.
Read more >
flutter_local_notifications | Flutter Package - Pub.dev
A cross platform plugin for displaying and scheduling local notifications for Flutter applications with the ability to customise for each platform.
Read more >
Scheduling local notifications - a free Hacking with iOS
If you run your app now, press the first button to request notification permission, then press the second to add an actual notification....
Read more >
Local Notifications Capacitor Plugin API
Android​. Starting on Android 12, scheduled notifications won't be exact unless this permission is added to your AndroidManifest.xml :.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found