add new API & update doc

添加设置允许推送时间和设置通知静默时间的 API
This commit is contained in:
Hevin
2016-04-18 21:35:43 +08:00
parent 8b481ddd92
commit b02e3faef0
3 changed files with 69 additions and 32 deletions
+10 -2
View File
@@ -340,8 +340,16 @@ JPushPlugin.prototype.requestPermission = function() {
}
}
JPushPlugin.prototype.setSilenceTime = function() {
JPushPlugin.prototype.setSilenceTime = function(startHour, startMinute, endHour, endMinute) {
if (device.platform == "Android") {
this.call_native("setSilenceTime", [startHour, startMinute, endHour, endMinute], null);
}
}
JPushPlugin.prototype.setPushTime = function(weekdays, startHour, endHour) {
if (device.platform == "Android") {
this.call_native("setPushTime", [weekdays, startHour, endHour], null);
}
}
if(!window.plugins) {