Hi,
Is there a way schedule a notification on an interval?
For example, notify the user 5PM everyday.
Thank you.
Have you tried the schedule notification api?
@npomfret how to configure the schedule notification api once so that it repeats every day? Can you provide an example pls?
Thx
A repeating schedule is supported. However, you can just use PushNotification.localNotificationSchedule to create a single scheduled notification (see the README docs). If you want a repeating notification just create several single notifications, one of each time you want it to fire.
So if I want to create an indefinite repeating schedule I have to create 99999999 single notification? Wouldn't it be easier to have like {repeat: interval/time} and it just repeats at this interval or time? Or did I get your idea completely wrong?
No, you got the idea right. I'm not sure there's a native API for doing what you want. Unless you can find one for iOS and Android??
If not...
The solution, wherever it goes, is just to schedule multiple notifications. You don't have to schedule all of them at once of course. You can schedule some, and then at a later date schedule some more... just repeat every now and then.
Repeating notifications are supported using this package in Android. For IOS, there is a PR for it in the react-native repo but it is not merged yet but you can just use that code. I am on travel right now and will put the instructions on how to configure repeating notifications for Android soon.
Sent from my iPhone
On 16-Sep-2016, at 9:27 PM, Nick Pomfret [email protected] wrote:
No, you got the idea right. I'm not sure there's a native API for doing what you want. Unless you can find one for iOS and Android??
If not...
The solution, wherever it goes, is just to schedule multiple notifications. You don't have to schedule all of them at once of course. You can schedule some, and then at a later date schedule some more... just repeat every now and then.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
@varun-acintyo awesome thanks! Looking forward to an update from you
Sorry, I am not able to find time to add documentation. You can configure repeating notifications for Android using this package by specifying a repeatType which could be one of "time", "week", "day", "hour", "minute" . If the repeatType is set to time, then there should be one more field repeatTime which should be a number equal to number of milliseconds between each repeating notification. Examples:
PushNotificationAndroid.localNotificationSchedule({
message: alertBody,
date: new Date(fireDate),
repeatType: 'week'
});
PushNotificationAndroid.localNotificationSchedule({
message: alertBody,
date: new Date(fireDate),
repeatType: 'time',
repeatTime: 3600000
});
Hi Guys!
repeatInterval is now supported in PushNotificationsIOS. Can someone please add this here? There already seems to be a PR available for this #288
Any update on this guys?
@arhmnsh This should be supported automatically if you are using a RN version after the merge.
@blaues0cke we should close this issue?
Close issue, right? We have this working on iOS with simply schedule local notification syntax.
Most helpful comment
Any update on this guys?