我正在使用firebase在本机响应中处理计划的本地推送通知。我已经在特定时间成功生成了这样的通知:
firebase.notifications().scheduleNotification(this.buildNotification(), {
fireDate: notificationTime.valueOf(), //a specific date is set using a datetimepicker
repeatInterval: "minute",
exact: true
});
我的问题是如何在scheduleNotification()
中设置多个提醒?在react-native-firebase中可以吗?
是,在react-native-firebase中是可能的
在您的buildNotification中
buildNotification = (notificationId) => {
const notification = new firebase.notifications.Notification()
.setNotificationId(notificationId) --> set here different id
return notification;
};