Reputation: 2176
I'm working on a scheduled local push notification in react native using firebase. I've successfully generated a notification on a specific time like this:
firebase.notifications().scheduleNotification(this.buildNotification(), {
fireDate: notificationTime.valueOf(), //a specific date is set using a datetimepicker
repeatInterval: "minute",
exact: true
});
My question is how can I set multiple reminders in scheduleNotification()
? Is is possible in react-native-firebase?
Upvotes: 1
Views: 401
Reputation: 171
Yes is possible in react-native-firebase
In your buildNotification
buildNotification = (notificationId) => {
const notification = new firebase.notifications.Notification()
.setNotificationId(notificationId) --> set here different id
return notification;
};
repeatInterval: 'day',
How frequently the notification should be repeated. One of minute, hour, day or week.
If not present, the notification will be displayed once.
Upvotes: 2