mirror of
https://github.com/jpush/jpush-phonegap-plugin.git
synced 2026-05-27 00:00:12 +08:00
add new API & update doc
添加设置允许推送时间和设置通知静默时间的 API
This commit is contained in:
+10
-2
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user