android - Cordova 本地通知
<p><p>您好,我正在开发一个程序。我将本地通知集成到程序中,但问题是我不能每天都重复。</p>
<p> <a href="https://github.com/katzer/cordova-plugin-local-notifications/wiki/11.-Samples" rel="noreferrer noopener nofollow">plugin</a> </p>
<p>我使用了这个插件,并在设备就绪的 index.js 中编写了这段代码。它工作正常,但是当我第一次添加通知时它会出错。</p>
<pre><code>cordova.plugins.notification.local.schedule({
id: 1,
text: "Come and Evaluate your Friends!",
firstAt: tomorrow_at_11_am,
every: "day"
});
</code></pre>
<p>firstAt:明天_at_11_am 部分不工作。我该如何解决这个问题?</p></p>
<br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
<p><blockquote>
<p>tomorrow_at_11_am</p>
</blockquote>
<p> 是一个变量。示例站点缺少此内容。在这里查看文档:</p>
<p> <a href="https://github.com/katzer/cordova-plugin-local-notifications/wiki/04.-Scheduling" rel="noreferrer noopener nofollow">https://github.com/katzer/cordova-plugin-local-notifications/wiki/04.-Scheduling</a> </p>
<p>在那里你可以找到:</p>
<blockquote>
<p>at, firstAt (Date or Number)</p>
<p>The date and time when the system should deliver the local
notification. If the specified value is nil or is a date in the past,
the local notification is delivered immediately.
- Default: now ~ new Date()</p>
</blockquote></p>
<p style="font-size: 20px;">关于android -Cordova 本地通知,我们在Stack Overflow上找到一个类似的问题:
<a href="https://stackoverflow.com/questions/34869998/" rel="noreferrer noopener nofollow" style="color: red;">
https://stackoverflow.com/questions/34869998/
</a>
</p>
页:
[1]