如何在反应本地Firebase推送通知中传递多个提醒?

问题描述 投票:1回答:1

我正在使用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中可以吗?

firebase react-native react-native-firebase
1个回答
0
投票

是,在react-native-firebase中是可能的

在您的buildNotification中

  buildNotification = (notificationId) => {
    const notification = new firebase.notifications.Notification()
       .setNotificationId(notificationId)  --> set here different  id    
   return notification;
};
© www.soinside.com 2019 - 2024. All rights reserved.