我正在尝试开发一个应用程序,显示我使用katzer / cordova-plugin-local-notifications和intel xdk IDE的通知我在Android中构建应用程序并在我的手机中安装.apk文件它工作正常但是当我为ios构建相同的应用程序并在iphone中安装.ipa,然后通知不起作用。
这是我的代码
function test(){
var msg = document.getElementById("myText").value;
if(msg==''){
msg='Please Take flower..';
}
var date = document.getElementById("myDate").value;
var time = document.getElementById("myTime").value;
var now = new Date(date+' '+time).getTime(), _60_seconds_from_now=new Date(now+1*1000);
window.plugin.notification.local.add(
{
id: 1,
title: 'title',
message: msg,
repeat: 'daily',
date: _60_seconds_from_now
});
navigator.notification.alert('Successfully Add Notification',null,"Notification ","OK!" );
}
and HTML Code is
<div data-role="page" id="page" >
<div id="hed5" data-role="header" >
<h3>
heder
</h3>
<a href="#" data-rel="back" class="ui-btn-left ui-btn ui-btn-icon-notext ui-shadow ui-corner-all" data-role="button" role="button" id="bckbtn">Back</a>
</div>
<div data-role="content">
<input type="date" id="date"><br>
<input type="time" id="time"><br>
<input type="text" id="text">
</div>
<br/>
<div class="center-button"><button type="submit" id="dr" onclick="test()" data-mini="true" style="font-style: oblique">notify</button></div>
</div>
</div>