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.

Example for Repeating Notification please?

See original GitHub issue

I’m doing the below to repeat notification

PushNotification.localNotification({
            id,
            title: titleReminder, 
            message: detailReminder,
            repeatType: repeatReminder, //'day', 'month', 'week'
            repeatTime: repeatTime 
        })

but the notifications are trigger one per second aprox. I try set the repeat time in milliseconds but the problem persist.

Can you give me an example of your settings for this please?

Im using

  • RN: 0.60.5
  • “react-native-push-notification”: “^3.1.9”

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:17

github_iconTop GitHub Comments

2reactions
coolvasanthcommented, May 1, 2020

@enzzoperez I tested it your suggestion. It works perfectly fine. Thank you so much for your help.

0reactions
Balthazar33commented, Jun 13, 2021

Hi @enzzoperez, If I want a notification to trigger in hour from now and then every 100 days at that same time, is the following code proper?

PushNotification.localNotificationSchedule({
                ...
                date: new Date(Date.now() + 60 * 1000 * 60), 
                repeatType:'time',
                repeatTime:(100) * 86400000), //Repeat every 100 days 
                importance:Importance.HIGH
               ...
            }); 

I remember that I did attempt without Moment but that didn’t work, you could try out with that code and if doesn’t work, you could try adding Moment

Yes, this does work. 👍

There’s a problem with this, though.

I have an array of messages, about a 100, and I’ve looped over the array to schedule a notification for each of those, one day at a time. eg., message 1 on day 1, message 2 on day 2,…and then message 1 on day 101, and so on and so forth.

The problem is, I got the notifications in the correct order for three days, but on the fourth day, I got the first notification again.

Can someone help me see where I might be going wrong?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Daily Repeating Local Notification In Android - YouTube
In this tutorial, we take a look at local notifications. How to combine AlarmManager with the BroadcastReceiver and create a repeating ...
Read more >
repeating local notifications | Apple Developer Forums
I am making an app that configures notifications on a save button and many of these notifications are on a repeat interval of...
Read more >
How do I set up a repeating daily notification with different ...
I think the problem is the repeats: true , so this notification you created will be shown repeatedly. You should schedule 1 notification...
Read more >
Notifications for any app repeating every 5mins!! Please help!
Here is an example of what happens, hopefully this can explain what ... Received message from WhatsApp and appears in my notification bar...
Read more >
How to get Repeated Notifications using Rule Machine
In each of these examples, the notification happens immediately. If you want to wait before notifying, your could put a delay on the...
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