mirror of
https://github.com/jpush/jpush-phonegap-plugin.git
synced 2025-01-31 22:42:51 +08:00
commit
1e2a4ce0e4
@ -143,7 +143,7 @@ window.JPush.getRegistrationID(function(data) {
|
|||||||
|
|
||||||
#### event - jpush.openNotification
|
#### event - jpush.openNotification
|
||||||
|
|
||||||
点击通知启动或唤醒应用程序时会出发该事件
|
点击通知启动或唤醒应用程序时会触发该事件
|
||||||
|
|
||||||
#### 代码示例
|
#### 代码示例
|
||||||
|
|
||||||
|
@ -1,102 +1,102 @@
|
|||||||
//
|
//
|
||||||
// PushTalkPlugin.h
|
// PushTalkPlugin.h
|
||||||
// PushTalk
|
// PushTalk
|
||||||
//
|
//
|
||||||
// Created by zhangqinghe on 13-12-13.
|
// Created by zhangqinghe on 13-12-13.
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
|
|
||||||
#import <Cordova/CDV.h>
|
#import <Cordova/CDV.h>
|
||||||
|
|
||||||
NSMutableDictionary *_jpushEventCache;
|
static NSMutableDictionary *_jpushEventCache;
|
||||||
|
|
||||||
@interface JPushPlugin : CDVPlugin{
|
@interface JPushPlugin : CDVPlugin{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//注册通知服务并启动 SDK
|
//注册通知服务并启动 SDK
|
||||||
-(void)startJPushSDK:(CDVInvokedUrlCommand*)command;
|
-(void)startJPushSDK:(CDVInvokedUrlCommand*)command;
|
||||||
|
|
||||||
//以下为js中可调用接口
|
//以下为js中可调用接口
|
||||||
//设置标签、别名
|
//设置标签、别名
|
||||||
-(void)setTags:(CDVInvokedUrlCommand*)command;
|
-(void)setTags:(CDVInvokedUrlCommand*)command;
|
||||||
-(void)addTags:(CDVInvokedUrlCommand*)command;
|
-(void)addTags:(CDVInvokedUrlCommand*)command;
|
||||||
-(void)deleteTags:(CDVInvokedUrlCommand*)command;
|
-(void)deleteTags:(CDVInvokedUrlCommand*)command;
|
||||||
-(void)cleanTags:(CDVInvokedUrlCommand*)command;
|
-(void)cleanTags:(CDVInvokedUrlCommand*)command;
|
||||||
-(void)getAllTags:(CDVInvokedUrlCommand*)command;
|
-(void)getAllTags:(CDVInvokedUrlCommand*)command;
|
||||||
-(void)checkTagBindState:(CDVInvokedUrlCommand*)command;
|
-(void)checkTagBindState:(CDVInvokedUrlCommand*)command;
|
||||||
|
|
||||||
-(void)setAlias:(CDVInvokedUrlCommand*)command;
|
-(void)setAlias:(CDVInvokedUrlCommand*)command;
|
||||||
-(void)deleteAlias:(CDVInvokedUrlCommand*)command;
|
-(void)deleteAlias:(CDVInvokedUrlCommand*)command;
|
||||||
-(void)getAlias:(CDVInvokedUrlCommand*)command;
|
-(void)getAlias:(CDVInvokedUrlCommand*)command;
|
||||||
|
|
||||||
//获取 RegistrationID
|
//获取 RegistrationID
|
||||||
-(void)getRegistrationID:(CDVInvokedUrlCommand*)command;
|
-(void)getRegistrationID:(CDVInvokedUrlCommand*)command;
|
||||||
|
|
||||||
//页面统计
|
//页面统计
|
||||||
-(void)startLogPageView:(CDVInvokedUrlCommand*)command;
|
-(void)startLogPageView:(CDVInvokedUrlCommand*)command;
|
||||||
-(void)stopLogPageView:(CDVInvokedUrlCommand*)command;
|
-(void)stopLogPageView:(CDVInvokedUrlCommand*)command;
|
||||||
-(void)beginLogPageView:(CDVInvokedUrlCommand*)command;
|
-(void)beginLogPageView:(CDVInvokedUrlCommand*)command;
|
||||||
|
|
||||||
//设置角标到服务器,服务器下一次发消息时,会设置成这个值
|
//设置角标到服务器,服务器下一次发消息时,会设置成这个值
|
||||||
//本接口不会改变应用本地的角标值.
|
//本接口不会改变应用本地的角标值.
|
||||||
-(void)setBadge:(CDVInvokedUrlCommand*)command;
|
-(void)setBadge:(CDVInvokedUrlCommand*)command;
|
||||||
//相当于 [setBadge:0]
|
//相当于 [setBadge:0]
|
||||||
-(void)resetBadge:(CDVInvokedUrlCommand*)command;
|
-(void)resetBadge:(CDVInvokedUrlCommand*)command;
|
||||||
|
|
||||||
//应用本地的角标值设置/获取
|
//应用本地的角标值设置/获取
|
||||||
-(void)setApplicationIconBadgeNumber:(CDVInvokedUrlCommand*)command;
|
-(void)setApplicationIconBadgeNumber:(CDVInvokedUrlCommand*)command;
|
||||||
-(void)getApplicationIconBadgeNumber:(CDVInvokedUrlCommand*)command;
|
-(void)getApplicationIconBadgeNumber:(CDVInvokedUrlCommand*)command;
|
||||||
|
|
||||||
//停止与恢复推送
|
//停止与恢复推送
|
||||||
-(void)stopPush:(CDVInvokedUrlCommand*)command;
|
-(void)stopPush:(CDVInvokedUrlCommand*)command;
|
||||||
-(void)resumePush:(CDVInvokedUrlCommand*)command;
|
-(void)resumePush:(CDVInvokedUrlCommand*)command;
|
||||||
-(void)isPushStopped:(CDVInvokedUrlCommand*)command;
|
-(void)isPushStopped:(CDVInvokedUrlCommand*)command;
|
||||||
|
|
||||||
//开关日志
|
//开关日志
|
||||||
-(void)setDebugModeFromIos:(CDVInvokedUrlCommand*)command;
|
-(void)setDebugModeFromIos:(CDVInvokedUrlCommand*)command;
|
||||||
-(void)setLogOFF:(CDVInvokedUrlCommand*)command;
|
-(void)setLogOFF:(CDVInvokedUrlCommand*)command;
|
||||||
-(void)crashLogON:(CDVInvokedUrlCommand*)command;
|
-(void)crashLogON:(CDVInvokedUrlCommand*)command;
|
||||||
|
|
||||||
//本地推送
|
//本地推送
|
||||||
-(void)setLocalNotification:(CDVInvokedUrlCommand*)command;
|
-(void)setLocalNotification:(CDVInvokedUrlCommand*)command;
|
||||||
-(void)deleteLocalNotificationWithIdentifierKey:(CDVInvokedUrlCommand*)command;
|
-(void)deleteLocalNotificationWithIdentifierKey:(CDVInvokedUrlCommand*)command;
|
||||||
-(void)clearAllLocalNotifications:(CDVInvokedUrlCommand*)command;
|
-(void)clearAllLocalNotifications:(CDVInvokedUrlCommand*)command;
|
||||||
|
|
||||||
//地理位置上报 [latitude,longitude]
|
//地理位置上报 [latitude,longitude]
|
||||||
-(void)setLocation:(CDVInvokedUrlCommand*)command;
|
-(void)setLocation:(CDVInvokedUrlCommand*)command;
|
||||||
|
|
||||||
//检查用户的推送设置情况
|
//检查用户的推送设置情况
|
||||||
-(void)getUserNotificationSettings:(CDVInvokedUrlCommand*)command;
|
-(void)getUserNotificationSettings:(CDVInvokedUrlCommand*)command;
|
||||||
|
|
||||||
//ios 10 APIs
|
//ios 10 APIs
|
||||||
-(void)addDismissActions:(CDVInvokedUrlCommand*)command;
|
-(void)addDismissActions:(CDVInvokedUrlCommand*)command;
|
||||||
-(void)addNotificationActions:(CDVInvokedUrlCommand*)command;
|
-(void)addNotificationActions:(CDVInvokedUrlCommand*)command;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 以下为js中可监听到的事件
|
* 以下为js中可监听到的事件
|
||||||
* jpush.openNotification 点击推送消息启动或唤醒app
|
* jpush.openNotification 点击推送消息启动或唤醒app
|
||||||
* jpush.receiveMessage 收到自定义消息
|
* jpush.receiveMessage 收到自定义消息
|
||||||
* jpush.receiveNotification 前台收到推送
|
* jpush.receiveNotification 前台收到推送
|
||||||
* jpush.backgroundNotification 后台收到推送
|
* jpush.backgroundNotification 后台收到推送
|
||||||
*/
|
*/
|
||||||
|
|
||||||
# pragma mark - private
|
# pragma mark - private
|
||||||
|
|
||||||
+(void)fireDocumentEvent:(NSString*)eventName jsString:(NSString*)jsString;
|
+(void)fireDocumentEvent:(NSString*)eventName jsString:(NSString*)jsString;
|
||||||
|
|
||||||
+(void)setupJPushSDK:(NSDictionary*)userInfo;
|
+(void)setupJPushSDK:(NSDictionary*)userInfo;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
JPushPlugin *SharedJPushPlugin;
|
static JPushPlugin *SharedJPushPlugin;
|
||||||
|
|
||||||
@interface NSDictionary (JPush)
|
@interface NSDictionary (JPush)
|
||||||
-(NSString*)toJsonString;
|
-(NSString*)toJsonString;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@interface NSString (JPush)
|
@interface NSString (JPush)
|
||||||
-(NSDictionary*)toDictionary;
|
-(NSDictionary*)toDictionary;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user