forked from github/jpush-phonegap-plugin
create ionic floder
This commit is contained in:
parent
6d013438cd
commit
c254794ace
@ -379,7 +379,7 @@ window.JPush.addLocalNotificationForIOS(delayTime, content, badge, notificationI
|
|||||||
|
|
||||||
#### 参数说明
|
#### 参数说明
|
||||||
|
|
||||||
- delayTime: 本地推送延迟多长时间后显示,数值类型或纯数字的字符型均可。
|
- delayTime: 本地推送延迟多长时间后显示,数值类型或纯数字的字符型均可,单位为秒。
|
||||||
- content: 本地推送需要显示的内容。
|
- content: 本地推送需要显示的内容。
|
||||||
- badge: 角标的数字。如果不需要改变角标传-1。数值类型或纯数字的字符型均可。
|
- badge: 角标的数字。如果不需要改变角标传-1。数值类型或纯数字的字符型均可。
|
||||||
- notificationID: 本地推送标识符,字符串。
|
- notificationID: 本地推送标识符,字符串。
|
||||||
|
BIN
example/js/.DS_Store
vendored
BIN
example/js/.DS_Store
vendored
Binary file not shown.
1
ionic/example
Submodule
1
ionic/example
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit a65634c0e15fc4cd737befe19802be7682e2269d
|
52
jpush/index.d.ts → ionic/jpush/index.d.ts
vendored
52
jpush/index.d.ts → ionic/jpush/index.d.ts
vendored
@ -1,4 +1,12 @@
|
|||||||
import { IonicNativePlugin } from '@ionic-native/core';
|
import { IonicNativePlugin } from '@ionic-native/core';
|
||||||
|
export interface TagOptions {
|
||||||
|
sequence: number;
|
||||||
|
tags?: Array<string>;
|
||||||
|
}
|
||||||
|
export interface AliasOptions {
|
||||||
|
sequence: number;
|
||||||
|
alias?: string;
|
||||||
|
}
|
||||||
export declare class JPush extends IonicNativePlugin {
|
export declare class JPush extends IonicNativePlugin {
|
||||||
init(): Promise<any>;
|
init(): Promise<any>;
|
||||||
setDebugMode(enable: boolean): Promise<any>;
|
setDebugMode(enable: boolean): Promise<any>;
|
||||||
@ -6,42 +14,18 @@ export declare class JPush extends IonicNativePlugin {
|
|||||||
stopPush(): Promise<any>;
|
stopPush(): Promise<any>;
|
||||||
resumePush(): Promise<any>;
|
resumePush(): Promise<any>;
|
||||||
isPushStopped(): Promise<any>;
|
isPushStopped(): Promise<any>;
|
||||||
/**
|
setTags(params: TagOptions): Promise<any>;
|
||||||
* @param params { sequence: number, tags: [string, string] }
|
addTags(params: TagOptions): Promise<any>;
|
||||||
*/
|
deleteTags(params: TagOptions): Promise<any>;
|
||||||
setTags(params: object): Promise<any>;
|
cleanTags(params: TagOptions): Promise<any>;
|
||||||
/**
|
getAllTags(params: TagOptions): Promise<any>;
|
||||||
* @param params { sequence: number, tags: [string, string] }
|
|
||||||
*/
|
|
||||||
addTags(params: object): Promise<any>;
|
|
||||||
/**
|
|
||||||
* @param params { sequence: number, tags: [string, string] }
|
|
||||||
*/
|
|
||||||
deleteTags(params: object): Promise<any>;
|
|
||||||
/**
|
|
||||||
* @param params { sequence: number }
|
|
||||||
*/
|
|
||||||
cleanTags(params: object): Promise<any>;
|
|
||||||
/**
|
|
||||||
* @param params { sequence: number }
|
|
||||||
*/
|
|
||||||
getAllTags(params: object): Promise<any>;
|
|
||||||
/**
|
/**
|
||||||
* @param params { sequence: number, tag: string }
|
* @param params { sequence: number, tag: string }
|
||||||
*/
|
*/
|
||||||
checkTagBindState(params: object): Promise<any>;
|
checkTagBindState(params: object): Promise<any>;
|
||||||
/**
|
setAlias(params: AliasOptions): Promise<any>;
|
||||||
* @param params { sequence: number, alias: string }
|
deleteAlias(params: AliasOptions): Promise<any>;
|
||||||
*/
|
getAlias(params: AliasOptions): Promise<any>;
|
||||||
setAlias(params: object): Promise<any>;
|
|
||||||
/**
|
|
||||||
* @param params { sequence: number }
|
|
||||||
*/
|
|
||||||
deleteAlias(params: object): Promise<any>;
|
|
||||||
/**
|
|
||||||
* @param params { sequence: number }
|
|
||||||
*/
|
|
||||||
getAlias(params: object): Promise<any>;
|
|
||||||
/**
|
/**
|
||||||
* Determinate whether the application notification has been opened.
|
* Determinate whether the application notification has been opened.
|
||||||
*
|
*
|
||||||
@ -60,7 +44,7 @@ export declare class JPush extends IonicNativePlugin {
|
|||||||
resetBadge(): Promise<any>;
|
resetBadge(): Promise<any>;
|
||||||
setApplicationIconBadgeNumber(badge: number): Promise<any>;
|
setApplicationIconBadgeNumber(badge: number): Promise<any>;
|
||||||
getApplicationIconBadgeNumber(): Promise<any>;
|
getApplicationIconBadgeNumber(): Promise<any>;
|
||||||
addLocalNotificationForIOS(delayTime: number, content: string, badge: number, notificationId: number, extras: string): Promise<any>;
|
addLocalNotificationForIOS(delayTime: number, content: string, badge: number, notificationId: number, extras?: string): Promise<any>;
|
||||||
deleteLocalNotificationWithIdentifierKeyInIOS(identifierKey: string): Promise<any>;
|
deleteLocalNotificationWithIdentifierKeyInIOS(identifierKey: string): Promise<any>;
|
||||||
addDismissActions(actions: Array<object>, categoryId: string): Promise<any>;
|
addDismissActions(actions: Array<object>, categoryId: string): Promise<any>;
|
||||||
addNotificationActions(actions: Array<object>, categoryId: string): Promise<any>;
|
addNotificationActions(actions: Array<object>, categoryId: string): Promise<any>;
|
||||||
@ -74,7 +58,7 @@ export declare class JPush extends IonicNativePlugin {
|
|||||||
clearAllNotification(): Promise<any>;
|
clearAllNotification(): Promise<any>;
|
||||||
clearNotificationById(id: number): Promise<any>;
|
clearNotificationById(id: number): Promise<any>;
|
||||||
setLatestNotificationNum(num: number): Promise<any>;
|
setLatestNotificationNum(num: number): Promise<any>;
|
||||||
addLocalNotification(builderId: number, content: string, title: string, notificationId: number, broadcastTime: number, extras: string): Promise<any>;
|
addLocalNotification(builderId: number, content: string, title: string, notificationId: number, broadcastTime: number, extras?: string): Promise<any>;
|
||||||
removeLocalNotification(notificationId: number): Promise<any>;
|
removeLocalNotification(notificationId: number): Promise<any>;
|
||||||
reportNotificationOpened(msgId: number): Promise<any>;
|
reportNotificationOpened(msgId: number): Promise<any>;
|
||||||
requestPermission(): Promise<any>;
|
requestPermission(): Promise<any>;
|
@ -30,41 +30,17 @@ var JPush = (function (_super) {
|
|||||||
JPush.prototype.stopPush = function () { return; };
|
JPush.prototype.stopPush = function () { return; };
|
||||||
JPush.prototype.resumePush = function () { return; };
|
JPush.prototype.resumePush = function () { return; };
|
||||||
JPush.prototype.isPushStopped = function () { return; };
|
JPush.prototype.isPushStopped = function () { return; };
|
||||||
/**
|
|
||||||
* @param params { sequence: number, tags: [string, string] }
|
|
||||||
*/
|
|
||||||
JPush.prototype.setTags = function (params) { return; };
|
JPush.prototype.setTags = function (params) { return; };
|
||||||
/**
|
|
||||||
* @param params { sequence: number, tags: [string, string] }
|
|
||||||
*/
|
|
||||||
JPush.prototype.addTags = function (params) { return; };
|
JPush.prototype.addTags = function (params) { return; };
|
||||||
/**
|
|
||||||
* @param params { sequence: number, tags: [string, string] }
|
|
||||||
*/
|
|
||||||
JPush.prototype.deleteTags = function (params) { return; };
|
JPush.prototype.deleteTags = function (params) { return; };
|
||||||
/**
|
|
||||||
* @param params { sequence: number }
|
|
||||||
*/
|
|
||||||
JPush.prototype.cleanTags = function (params) { return; };
|
JPush.prototype.cleanTags = function (params) { return; };
|
||||||
/**
|
|
||||||
* @param params { sequence: number }
|
|
||||||
*/
|
|
||||||
JPush.prototype.getAllTags = function (params) { return; };
|
JPush.prototype.getAllTags = function (params) { return; };
|
||||||
/**
|
/**
|
||||||
* @param params { sequence: number, tag: string }
|
* @param params { sequence: number, tag: string }
|
||||||
*/
|
*/
|
||||||
JPush.prototype.checkTagBindState = function (params) { return; };
|
JPush.prototype.checkTagBindState = function (params) { return; };
|
||||||
/**
|
|
||||||
* @param params { sequence: number, alias: string }
|
|
||||||
*/
|
|
||||||
JPush.prototype.setAlias = function (params) { return; };
|
JPush.prototype.setAlias = function (params) { return; };
|
||||||
/**
|
|
||||||
* @param params { sequence: number }
|
|
||||||
*/
|
|
||||||
JPush.prototype.deleteAlias = function (params) { return; };
|
JPush.prototype.deleteAlias = function (params) { return; };
|
||||||
/**
|
|
||||||
* @param params { sequence: number }
|
|
||||||
*/
|
|
||||||
JPush.prototype.getAlias = function (params) { return; };
|
JPush.prototype.getAlias = function (params) { return; };
|
||||||
/**
|
/**
|
||||||
* Determinate whether the application notification has been opened.
|
* Determinate whether the application notification has been opened.
|
||||||
@ -363,7 +339,7 @@ var JPush = (function (_super) {
|
|||||||
Plugin({
|
Plugin({
|
||||||
pluginName: 'JPush',
|
pluginName: 'JPush',
|
||||||
plugin: 'jpush-phonegap-plugin',
|
plugin: 'jpush-phonegap-plugin',
|
||||||
pluginRef: 'jPush',
|
pluginRef: 'plugins.jPushPlugin',
|
||||||
repo: 'https://github.com/jpush/jpush-phonegap-plugin',
|
repo: 'https://github.com/jpush/jpush-phonegap-plugin',
|
||||||
install: 'ionic cordova plugin add jpush-phonegap-plugin --variable APP_KEY=your_app_key',
|
install: 'ionic cordova plugin add jpush-phonegap-plugin --variable APP_KEY=your_app_key',
|
||||||
installVariables: ['APP_KEY'],
|
installVariables: ['APP_KEY'],
|
1
ionic/jpush/index.js.map
Normal file
1
ionic/jpush/index.js.map
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
BIN
ionic/jpush/jiguang-ionic-jpush-1.0.0.tgz
Normal file
BIN
ionic/jpush/jiguang-ionic-jpush-1.0.0.tgz
Normal file
Binary file not shown.
File diff suppressed because one or more lines are too long
@ -241,7 +241,7 @@
|
|||||||
CDVPluginResult* result;
|
CDVPluginResult* result;
|
||||||
|
|
||||||
if (iResCode == 0) {
|
if (iResCode == 0) {
|
||||||
[dic setObject:[iTags allObjects] forKey:@"tags"];
|
dic[@"tag"] = tag;
|
||||||
[dic setObject:[NSNumber numberWithBool:isBind] forKey:@"isBind"];
|
[dic setObject:[NSNumber numberWithBool:isBind] forKey:@"isBind"];
|
||||||
result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:dic];
|
result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:dic];
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user