2014-01-20 18:27:31 +08:00
|
|
|
//
|
|
|
|
// PushTalkPlugin.h
|
|
|
|
// PushTalk
|
|
|
|
//
|
|
|
|
// Created by zhangqinghe on 13-12-13.
|
|
|
|
//
|
|
|
|
//
|
|
|
|
|
|
|
|
#import <Cordova/CDV.h>
|
|
|
|
|
2015-03-10 16:37:08 +08:00
|
|
|
#define kJPushPluginReceiveNotification @"JPushPluginReceiveNofication"
|
|
|
|
|
2014-01-20 18:27:31 +08:00
|
|
|
@interface JPushPlugin : CDVPlugin{
|
2016-03-08 16:46:12 +08:00
|
|
|
|
2014-01-20 18:27:31 +08:00
|
|
|
}
|
|
|
|
|
2015-04-10 13:42:25 +08:00
|
|
|
+(void)setLaunchOptions:(NSDictionary *)theLaunchOptions;
|
2016-03-08 16:46:12 +08:00
|
|
|
|
|
|
|
//以下为js中可调用接口
|
|
|
|
//设置标签、别名
|
2014-01-20 18:27:31 +08:00
|
|
|
-(void)setTagsWithAlias:(CDVInvokedUrlCommand*)command;
|
|
|
|
-(void)setTags:(CDVInvokedUrlCommand*)command;
|
|
|
|
-(void)setAlias:(CDVInvokedUrlCommand*)command;
|
2016-03-08 16:46:12 +08:00
|
|
|
|
|
|
|
//获取 RegistrationID
|
2014-06-04 13:20:24 +08:00
|
|
|
-(void)getRegistrationID:(CDVInvokedUrlCommand*)command;
|
2016-03-08 16:46:12 +08:00
|
|
|
|
|
|
|
//页面统计
|
2014-06-05 16:36:54 +08:00
|
|
|
-(void)startLogPageView:(CDVInvokedUrlCommand*)command;
|
|
|
|
-(void)stopLogPageView:(CDVInvokedUrlCommand*)command;
|
2016-03-08 16:46:12 +08:00
|
|
|
-(void)beginLogPageView:(CDVInvokedUrlCommand*)command;
|
2014-06-05 16:36:54 +08:00
|
|
|
|
2016-03-08 16:46:12 +08:00
|
|
|
//设置角标到服务器,服务器下一次发消息时,会设置成这个值
|
2016-01-21 15:15:48 +08:00
|
|
|
//本接口不会改变应用本地的角标值.
|
|
|
|
-(void)setBadge:(CDVInvokedUrlCommand*)command;
|
|
|
|
//相当于 [setBadge:0]
|
|
|
|
-(void)resetBadge:(CDVInvokedUrlCommand*)command;
|
|
|
|
|
2016-03-08 16:46:12 +08:00
|
|
|
//应用本地的角标值设置/获取
|
2016-01-21 15:15:48 +08:00
|
|
|
-(void)setApplicationIconBadgeNumber:(CDVInvokedUrlCommand*)command;
|
|
|
|
-(void)getApplicationIconBadgeNumber:(CDVInvokedUrlCommand*)command;
|
|
|
|
|
2016-03-08 16:46:12 +08:00
|
|
|
//停止与恢复推送
|
|
|
|
-(void)stopPush:(CDVInvokedUrlCommand*)command;
|
|
|
|
-(void)resumePush:(CDVInvokedUrlCommand*)command;
|
|
|
|
-(void)isPushStopped:(CDVInvokedUrlCommand*)command;
|
|
|
|
|
|
|
|
//开关日志
|
|
|
|
-(void)setDebugModeFromIos:(CDVInvokedUrlCommand*)command;
|
|
|
|
-(void)setLogOFF:(CDVInvokedUrlCommand*)command;
|
2016-03-09 13:18:09 +08:00
|
|
|
-(void)crashLogON:(CDVInvokedUrlCommand*)command;
|
|
|
|
|
|
|
|
//本地推送
|
|
|
|
-(void)setLocalNotification:(CDVInvokedUrlCommand*)command;
|
|
|
|
-(void)deleteLocalNotificationWithIdentifierKey:(CDVInvokedUrlCommand*)command;
|
|
|
|
-(void)clearAllLocalNotifications:(CDVInvokedUrlCommand*)command;
|
|
|
|
|
|
|
|
//地理位置上报 [latitude,longitude]
|
|
|
|
-(void)setLocation:(CDVInvokedUrlCommand*)command;
|
2016-03-08 16:46:12 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* 以下为js中可监听到的事件
|
2016-04-22 15:44:04 +08:00
|
|
|
* jpush.openNotification 点击推送消息启动或唤醒app
|
2016-03-08 16:46:12 +08:00
|
|
|
* jpush.setTagsWithAlias 设置标签、别名完成
|
|
|
|
* jpush.receiveMessage 收到自定义消息
|
2016-04-22 15:44:04 +08:00
|
|
|
* jpush.receiveNotification 前台收到推送
|
|
|
|
* jpush.backgoundNotification 后台收到推送
|
2016-03-08 16:46:12 +08:00
|
|
|
*/
|
2016-01-21 15:15:48 +08:00
|
|
|
|
2014-01-20 18:27:31 +08:00
|
|
|
@end
|