mirror of
https://github.com/jpush/jpush-phonegap-plugin.git
synced 2025-03-17 06:21:05 +08:00
添加了ios 停止推送的js接口
This commit is contained in:
parent
9536989082
commit
219ae72758
@ -39,6 +39,8 @@
|
|||||||
var initiateUI = function(){
|
var initiateUI = function(){
|
||||||
|
|
||||||
window.plugins.jPushPlugin.getRegistrationID(onGetRegistradionID);
|
window.plugins.jPushPlugin.getRegistrationID(onGetRegistradionID);
|
||||||
|
window.plugins.jPushPlugin.stopPush();
|
||||||
|
|
||||||
//test android interface
|
//test android interface
|
||||||
//window.plugins.jPushPlugin.stopPush()
|
//window.plugins.jPushPlugin.stopPush()
|
||||||
//window.plugins.jPushPlugin.resumePush();
|
//window.plugins.jPushPlugin.resumePush();
|
||||||
|
@ -139,7 +139,11 @@
|
|||||||
|
|
||||||
[APService setLogOFF];
|
[APService setLogOFF];
|
||||||
}
|
}
|
||||||
|
-(void)stopPush:(CDVInvokedUrlCommand*)command{
|
||||||
|
|
||||||
|
[[UIApplication sharedApplication]unregisterForRemoteNotifications];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
- (void)failWithCallbackID:(NSString *)callbackID {
|
- (void)failWithCallbackID:(NSString *)callbackID {
|
||||||
CDVPluginResult *result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR];
|
CDVPluginResult *result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR];
|
||||||
|
@ -180,10 +180,8 @@ JPushPlugin.prototype.setCustomPushNotificationBuilder = function(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
JPushPlugin.prototype.stopPush = function(){
|
JPushPlugin.prototype.stopPush = function(){
|
||||||
if(device.platform == "Android") {
|
data=[];
|
||||||
data=[];
|
this.call_native("stopPush",data,null);
|
||||||
this.call_native("stopPush",data,null);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
JPushPlugin.prototype.resumePush = function(){
|
JPushPlugin.prototype.resumePush = function(){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user