【问题标题】:Cordova Local Notification Repeat after firstAt科尔多瓦本地通知在 firstAt 后重复
【发布时间】:2019-07-12 16:42:46
【问题描述】:

Cordova 插件通知在到达第一个日期后每天触发

cordova.plugins.notification.local.schedule({
     id: id,
     title: title,
     message: message,
     firstAt: schedule_date_time,
     every: 'day',
     // sound:true,
      actions: [
              { id: 'yes', title: 'TAKE ACTION' }

            ]
 });

我希望每天触发通知,但仅在到达 firstAt 日期时触发。所以通知在 firstAt 日期起作用,并且每天继续触发一次,直到用户采取行动

【问题讨论】:

    标签: cordova notifications cordova-plugins


    【解决方案1】:

    您将需要使用trigger 配置来实现相同的目的。更多信息here

    cordova.plugins.notification.local.schedule({
      id: id,
      title: title,
      message: message,
      // sound:true,
      actions: [{
          id: 'yes',
          title: 'TAKE ACTION'
        }
      ]
      trigger: {
        at: schedule_date_time
      }
    });
    

    关于如何准确设置 触发配置以及“计数”的确切作用,但这肯定是 最终解决方案的起点。

    【讨论】:

    • 我已经升级到 0.9.0-beta.3。我希望第一个触发器发生在某个日期,然后从第二天开始每天重复
    猜你喜欢
    • 1970-01-01
    • 2018-08-15
    • 1970-01-01
    • 2019-01-28
    • 1970-01-01
    • 1970-01-01
    • 2017-09-06
    • 2014-10-25
    • 2014-07-24
    相关资源
    最近更新 更多