我想在触发第一个通知后安排新的本地通知,但似乎触发事件无法正常工作。我正在试用IOS设备。
var alarmTime = new Date();
alarmTime.setSeconds(alarmTime.getSeconds() + 20);
cordova.plugins.notification.local.schedule({
id: "1",
at: alarmTime,
text: "Test",
title: "Test",
sound: PontualproFactory.isiOSDevice()?'file://beep.caf':'file://sound.mp3'
});
cordova.plugins.notification.local.on("trigger", function (notification) {
alarmTime = new Date();
alarmTime.setSeconds(alarmTime.getSeconds() + 20);
cordova.plugins.notification.local.schedule({
id: "2",
at: alarmTime,
text: "Test",
title: "Test",
sound: PontualproFactory.isiOSDevice()?'file://beep.caf':'file://sound.mp3'
});
});
答案 0 :(得分:0)
我的开源库BlackTie.js具有server {
listen 80;
server_name www.yoursite.com;
client_max_body_size 1000M;
location / {
proxy_pass_header Server;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
proxy_connect_timeout 1000;
proxy_read_timeout 1000;
proxy_pass http://127.0.0.1:8000/; # This is the trick !
proxy_buffering off;
proxy_set_header Connection '';
proxy_http_version 1.1;
chunked_transfer_encoding off;
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, OPTIONS';
}
}
功能,可以完全满足您的需求!