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.

Repeat every day on the given time

See original GitHub issue

WARNING: IF YOU IGNORE THIS TEMPLATE, WE’LL IGNORE YOUR ISSUE. YOU MUST FILL THIS IN!

Provide a general summary of the issue. The notification shows once I install the app but then on a swipe of notification it appears again also app won’t open on tap and then after a minute it crashes.

Your Environment

  • Plugin version: “cordova-plugin-local-notification”: “^0.9.0-beta.2”,
  • Platform: android
  • OS version: Ubuntu 18.10
  • Device manufacturer / model: Issue occurs in all device
  • Cordova version (cordova -v): 9.0.0
  • Cordova platform version (cordova platform ls): android 8.1.0
  • Plugin config
  • Ionic Version (if using Ionic) Not ionic

Expected Behavior

Tell us what should happen After installing the app, Array of given notification should appear every day at a given time. I should be able to remove the notification on swipe and should also be able to open the app on tap of the notification.

Actual Behavior

The notification doesn’t go when I clear the notification panel. My app doesn’t open on tap. App crashes after a minute.

Steps to Reproduce

Reproduce this issue; include code to reproduce, if relevant

  1. on cordova “deviceready” add the following code.
onDeviceReady() {
      // Now safe to use device APIs
      if (window.cordova) {
        alert("device ready");
        let cordovaPlugin = cordova.plugins;
        cordovaPlugin.notification.local.schedule([
          {
            id: 0,
            title: "Remind",
            text: "Remind me to drink water.",
            trigger: {
              every: {
                hour: 17,
                minute: 36
              }
            }
          },
          {
            id: 1,
            title: "Remind",
            text: "Buy Milk",
            trigger: {
              every: {
                hour: 17,
                minute: 34
              }
            }
          }
        ]);
      }
    }
  1. Create and install the cordova “app-debug.apk” on any android phone.
  2. open the app and initiate the plugin and wait for the given time.
  3. notification appears on a given time but you can neither get rid of notification nor able to open the app. After a minute app will crash and notification will go away.

Context

I am trying to create a reminder for everyday but different timings. eg:

  1. Remind me to drink water everyday at morning 8 AM.
  2. Remind me to watch the movie every day at 9 PM.

Debug logs

no issue on logs compiles successfully.

Include iOS / Android logs No error logs observed.

  • ios XCode logs
  • Android: $ adb logcat

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:1
  • Comments:7

github_iconTop GitHub Comments

2reactions
rahmadidcommented, Aug 23, 2020

hi all, perhaps you can try this fork, it is more recent and still maintained: https://github.com/timkellypa/cordova-plugin-local-notifications

hope it helps. thanks.

1reaction
PiloTeZcommented, Aug 23, 2020

Guys, I sat all day and came to the following conclusion. Cordova notifications work so-so and for reliability it is better to use the most typical simple designs. In my case, notifications need to be sent daily at 21:00. “Trigger every” does not work. It worked for me for ionic 3, but after switching to ionic 5 it began to get stuck like yours.

Solution: in a loop, create several “trigger at” notifications for the required dates, instead of one with “trigger every”. For me, it’s enough to create notifications 10 days in advance and update these notifications every time the application is launched. To update, it is enough with these 10 notifications to put down the same ID every time.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Create a recurring event - Android - Google Calendar Help
Make changes to repeating events · On your Android phone or tablet, open the Google Calendar app Calendar · Tap the event you...
Read more >
Set up or delete a repeating event in Calendar on Mac
Daily : Enter the number of days between each repeat. For example, to create an event that occurs every other day, enter the...
Read more >
Set a recurring due date - Todoist
A recurring task is a single task with a shifting due date, which updates upon completing the task. This means that it's not...
Read more >
Creating Regular Repeating Reminders - YouTube
Reminders can repeat hourly, daily, weekly, monthly and with all kinds of patterns such as specific days of the week or the nth...
Read more >
Set up special repeating and multi-day cases - Trumba
Events that repeat only certain days of the week · On the add/edit event form, on the Event Information tab, select the date...
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