From bb7b81021548ba33d47e2efbb205642eeb4ecf22 Mon Sep 17 00:00:00 2001 From: Hevin Date: Mon, 27 Nov 2017 20:36:41 +0800 Subject: [PATCH 01/21] Add ionic-native --- index.ts | 185 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 185 insertions(+) create mode 100644 index.ts diff --git a/index.ts b/index.ts new file mode 100644 index 0000000..b4807c5 --- /dev/null +++ b/index.ts @@ -0,0 +1,185 @@ +import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core'; +import { Injectable } from '@angular/core'; + +@Plugin({ + pluginName: 'JPush', + plugin: 'jpush-phonegap-plugin', + pluginRef: 'jPush', + repo: 'https://github.com/jpush/jpush-phonegap-plugin', + install: 'ionic cordova plugin add jpush-phonegap-plugin --variable APP_KEY=your_app_key', + installVariables: ['APP_KEY'], + platforms: ['Android', 'iOS'] +}) +@Injectable() +export class JPush extends IonicNativePlugin { + + @Cordova + init(): Promise { return; } + + @Cordova + setDebugMode(enable: boolean): Promise { return; } + + @Cordova + getRegistrationID(): Promise { return; } + + @Cordova + stopPush(): Promise { return; } + + @Cordova + resumePush(): Promise { return; } + + @Cordova + isPushStopped(): Promise { return; } + + /** + * @param params { sequence: number, tags: [string, string] } + */ + @Cordova + setTags(params: object): Promise { return; } + + /** + * @param params { sequence: number, tags: [string, string] } + */ + @Cordova + addTags(params: object): Promise { return; } + + /** + * @param params { sequence: number, tags: [string, string] } + */ + @Cordova + deleteTags(params: object): Promise { return; } + + /** + * @param params { sequence: number } + */ + @Cordova + cleanTags(params: object): Promise { return; } + + /** + * @param params { sequence: number } + */ + @Cordova + getAllTags(params: object): Promise { return; } + + /** + * @param params { sequence: number, tag: string } + */ + @Cordova + checkTagBindState(params: object): Promise { return; } + + /** + * @param params { sequence: number, alias: string } + */ + @Cordova + setAlias(params: object): Promise { return; } + + /** + * @param params { sequence: number } + */ + @Cordova + deleteAlias(params: object): Promise { return; } + + /** + * @param params { sequence: number } + */ + @Cordova + getAlias(params: object): Promise { return; } + + /** + * Determinate whether the application notification has been opened. + * + * iOS: 0: closed; >1: opened. + * UIRemoteNotificationTypeNone = 0, + * UIRemoteNotificationTypeBadge = 1 << 0, + * UIRemoteNotificationTypeSound = 1 << 1, + * UIRemoteNotificationTypeAlert = 1 << 2, + * UIRemoteNotificationTypeNewsstandContentAvailability = 1 << 3 + * + * Android: 0: closed; 1: opened. + */ + @Cordova + getUserNotificationSettings(): Promise { return; } + + @Cordova + clearLocalNotifications(): Promise { return; } + + // iOS API - start + + @Cordova + setBadge(badge: number): Promise { return; } + + @Cordova + resetBadge(): Promise { return; } + + @Cordova + setApplicationIconBadgeNumber(badge: number): Promise { return; } + + @Cordova + getApplicationIconBadgeNumber(): Promise { return; } + + @Cordova + addLocalNotificationForIOS(delayTime: number, content: string, badge: number, notificationId: number, extras: string): Promise { return; } + + @Cordova + deleteLocalNotificationWithIdentifierKeyInIOS(identifierKey: string): Promise { return; } + + @Cordova + addDismissActions(actions: Array, categoryId: string): Promise { return; } + + @Cordova + addNotificationActions(actions: Array, categoryId: string): Promise { return; } + + @Cordova + setLocation(latitude: number, longitude: number): Promise { return; } + + @Cordova + startLogPageView(pageName: string): Promise { return; } + + @Cordova + stopLogPageView(pageName: string): Promise { return; } + + @Cordova + beginLogPageView(pageName: string, duration: number): Promise { return; } + + // iOS API - end + + // Android API - start + + @Cordova + getConnectionState(): Promise { return; } + + @Cordova + setBasicPushNotificationBuilder(): Promise { return; } + + @Cordova + setCustomPushNotificationBuilder(): Promise { return; } + + @Cordova + clearAllNotification(): Promise { return; } + + @Cordova + clearNotificationById(id: number): Promise { return; } + + @Cordova + setLatestNotificationNum(num: number): Promise { return; } + + @Cordova + addLocalNotification(builderId: number, content: string, title: string, notificationId: number, broadcastTime: number, extras: string): Promise { return; } + + @Cordova + removeLocalNotification(notificationId: number): Promise { return; } + + @Cordova + reportNotificationOpened(msgId: number): Promise { return; } + + @Cordova + requestPermission(): Promise { return; } + + @Cordova + setSilenceTime(startHour: number, startMinute: number, endHour: number, endMinute: number): Promise { return; } + + @Cordova + setPushTime(weekdays: Array, startHour: number, endHour: number): Promise { return; } + + // Android API - end +} \ No newline at end of file From a891578f7490a2f86a6fc902167cc67457f40108 Mon Sep 17 00:00:00 2001 From: Hevin Date: Thu, 7 Dec 2017 21:32:48 +0800 Subject: [PATCH 02/21] Complete index.ts --- index.ts | 140 +++++++++++++++++++++++++------------------------------ 1 file changed, 63 insertions(+), 77 deletions(-) diff --git a/index.ts b/index.ts index b4807c5..e1615ac 100644 --- a/index.ts +++ b/index.ts @@ -1,6 +1,16 @@ import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core'; import { Injectable } from '@angular/core'; +export interface TagOptions { + sequence: number; + tags?: Array; +} + +export interface AliasOptions { + sequence: number; + alias?: string; +} + @Plugin({ pluginName: 'JPush', plugin: 'jpush-phonegap-plugin', @@ -13,77 +23,53 @@ import { Injectable } from '@angular/core'; @Injectable() export class JPush extends IonicNativePlugin { - @Cordova + @Cordova() init(): Promise { return; } - @Cordova + @Cordova() setDebugMode(enable: boolean): Promise { return; } - @Cordova + @Cordova() getRegistrationID(): Promise { return; } - @Cordova + @Cordova() stopPush(): Promise { return; } - @Cordova + @Cordova() resumePush(): Promise { return; } - @Cordova + @Cordova() isPushStopped(): Promise { return; } - /** - * @param params { sequence: number, tags: [string, string] } - */ - @Cordova - setTags(params: object): Promise { return; } + @Cordova() + setTags(params: TagOptions): Promise { return; } - /** - * @param params { sequence: number, tags: [string, string] } - */ - @Cordova - addTags(params: object): Promise { return; } + @Cordova() + addTags(params: TagOptions): Promise { return; } - /** - * @param params { sequence: number, tags: [string, string] } - */ - @Cordova - deleteTags(params: object): Promise { return; } + @Cordova() + deleteTags(params: TagOptions): Promise { return; } - /** - * @param params { sequence: number } - */ - @Cordova - cleanTags(params: object): Promise { return; } + @Cordova() + cleanTags(params: TagOptions): Promise { return; } - /** - * @param params { sequence: number } - */ - @Cordova - getAllTags(params: object): Promise { return; } + @Cordova() + getAllTags(params: TagOptions): Promise { return; } /** * @param params { sequence: number, tag: string } */ - @Cordova + @Cordova() checkTagBindState(params: object): Promise { return; } - /** - * @param params { sequence: number, alias: string } - */ - @Cordova - setAlias(params: object): Promise { return; } + @Cordova() + setAlias(params: AliasOptions): Promise { return; } - /** - * @param params { sequence: number } - */ - @Cordova - deleteAlias(params: object): Promise { return; } + @Cordova() + deleteAlias(params: AliasOptions): Promise { return; } - /** - * @param params { sequence: number } - */ - @Cordova - getAlias(params: object): Promise { return; } + @Cordova() + getAlias(params: AliasOptions): Promise { return; } /** * Determinate whether the application notification has been opened. @@ -97,89 +83,89 @@ export class JPush extends IonicNativePlugin { * * Android: 0: closed; 1: opened. */ - @Cordova + @Cordova() getUserNotificationSettings(): Promise { return; } - @Cordova + @Cordova() clearLocalNotifications(): Promise { return; } // iOS API - start - @Cordova + @Cordova() setBadge(badge: number): Promise { return; } - @Cordova + @Cordova() resetBadge(): Promise { return; } - @Cordova + @Cordova() setApplicationIconBadgeNumber(badge: number): Promise { return; } - @Cordova + @Cordova() getApplicationIconBadgeNumber(): Promise { return; } - @Cordova - addLocalNotificationForIOS(delayTime: number, content: string, badge: number, notificationId: number, extras: string): Promise { return; } + @Cordova() + addLocalNotificationForIOS(delayTime: number, content: string, badge: number, notificationId: number, extras?: string): Promise { return; } - @Cordova + @Cordova() deleteLocalNotificationWithIdentifierKeyInIOS(identifierKey: string): Promise { return; } - @Cordova + @Cordova() addDismissActions(actions: Array, categoryId: string): Promise { return; } - @Cordova + @Cordova() addNotificationActions(actions: Array, categoryId: string): Promise { return; } - @Cordova + @Cordova() setLocation(latitude: number, longitude: number): Promise { return; } - @Cordova + @Cordova() startLogPageView(pageName: string): Promise { return; } - @Cordova + @Cordova() stopLogPageView(pageName: string): Promise { return; } - @Cordova - beginLogPageView(pageName: string, duration: number): Promise { return; } + @Cordova() + beginLogPageView(pageName: string, duration: number): Promise { return; } // iOS API - end // Android API - start - @Cordova + @Cordova() getConnectionState(): Promise { return; } - @Cordova + @Cordova() setBasicPushNotificationBuilder(): Promise { return; } - @Cordova + @Cordova() setCustomPushNotificationBuilder(): Promise { return; } - @Cordova + @Cordova() clearAllNotification(): Promise { return; } - @Cordova + @Cordova() clearNotificationById(id: number): Promise { return; } - @Cordova + @Cordova() setLatestNotificationNum(num: number): Promise { return; } - @Cordova - addLocalNotification(builderId: number, content: string, title: string, notificationId: number, broadcastTime: number, extras: string): Promise { return; } + @Cordova() + addLocalNotification(builderId: number, content: string, title: string, notificationId: number, broadcastTime: number, extras?: string): Promise { return; } - @Cordova + @Cordova() removeLocalNotification(notificationId: number): Promise { return; } - @Cordova + @Cordova() reportNotificationOpened(msgId: number): Promise { return; } - @Cordova + @Cordova() requestPermission(): Promise { return; } - @Cordova + @Cordova() setSilenceTime(startHour: number, startMinute: number, endHour: number, endMinute: number): Promise { return; } - @Cordova + @Cordova() setPushTime(weekdays: Array, startHour: number, endHour: number): Promise { return; } // Android API - end -} \ No newline at end of file +} From 4f4a7e44f86ce05fd14453859a59e1f2863331fa Mon Sep 17 00:00:00 2001 From: Hevin Date: Thu, 7 Dec 2017 21:35:43 +0800 Subject: [PATCH 03/21] build ionic-native/jpush --- jpush/index.d.ts | 83 +++++++++ jpush/index.js | 376 ++++++++++++++++++++++++++++++++++++++ jpush/index.js.map | 1 + jpush/index.metadata.json | 1 + jpush/package.json | 18 ++ 5 files changed, 479 insertions(+) create mode 100644 jpush/index.d.ts create mode 100644 jpush/index.js create mode 100644 jpush/index.js.map create mode 100644 jpush/index.metadata.json create mode 100644 jpush/package.json diff --git a/jpush/index.d.ts b/jpush/index.d.ts new file mode 100644 index 0000000..9d2b94e --- /dev/null +++ b/jpush/index.d.ts @@ -0,0 +1,83 @@ +import { IonicNativePlugin } from '@ionic-native/core'; +export declare class JPush extends IonicNativePlugin { + init(): Promise; + setDebugMode(enable: boolean): Promise; + getRegistrationID(): Promise; + stopPush(): Promise; + resumePush(): Promise; + isPushStopped(): Promise; + /** + * @param params { sequence: number, tags: [string, string] } + */ + setTags(params: object): Promise; + /** + * @param params { sequence: number, tags: [string, string] } + */ + addTags(params: object): Promise; + /** + * @param params { sequence: number, tags: [string, string] } + */ + deleteTags(params: object): Promise; + /** + * @param params { sequence: number } + */ + cleanTags(params: object): Promise; + /** + * @param params { sequence: number } + */ + getAllTags(params: object): Promise; + /** + * @param params { sequence: number, tag: string } + */ + checkTagBindState(params: object): Promise; + /** + * @param params { sequence: number, alias: string } + */ + setAlias(params: object): Promise; + /** + * @param params { sequence: number } + */ + deleteAlias(params: object): Promise; + /** + * @param params { sequence: number } + */ + getAlias(params: object): Promise; + /** + * Determinate whether the application notification has been opened. + * + * iOS: 0: closed; >1: opened. + * UIRemoteNotificationTypeNone = 0, + * UIRemoteNotificationTypeBadge = 1 << 0, + * UIRemoteNotificationTypeSound = 1 << 1, + * UIRemoteNotificationTypeAlert = 1 << 2, + * UIRemoteNotificationTypeNewsstandContentAvailability = 1 << 3 + * + * Android: 0: closed; 1: opened. + */ + getUserNotificationSettings(): Promise; + clearLocalNotifications(): Promise; + setBadge(badge: number): Promise; + resetBadge(): Promise; + setApplicationIconBadgeNumber(badge: number): Promise; + getApplicationIconBadgeNumber(): Promise; + addLocalNotificationForIOS(delayTime: number, content: string, badge: number, notificationId: number, extras: string): Promise; + deleteLocalNotificationWithIdentifierKeyInIOS(identifierKey: string): Promise; + addDismissActions(actions: Array, categoryId: string): Promise; + addNotificationActions(actions: Array, categoryId: string): Promise; + setLocation(latitude: number, longitude: number): Promise; + startLogPageView(pageName: string): Promise; + stopLogPageView(pageName: string): Promise; + beginLogPageView(pageName: string, duration: number): Promise; + getConnectionState(): Promise; + setBasicPushNotificationBuilder(): Promise; + setCustomPushNotificationBuilder(): Promise; + clearAllNotification(): Promise; + clearNotificationById(id: number): Promise; + setLatestNotificationNum(num: number): Promise; + addLocalNotification(builderId: number, content: string, title: string, notificationId: number, broadcastTime: number, extras: string): Promise; + removeLocalNotification(notificationId: number): Promise; + reportNotificationOpened(msgId: number): Promise; + requestPermission(): Promise; + setSilenceTime(startHour: number, startMinute: number, endHour: number, endMinute: number): Promise; + setPushTime(weekdays: Array, startHour: number, endHour: number): Promise; +} diff --git a/jpush/index.js b/jpush/index.js new file mode 100644 index 0000000..a1aadca --- /dev/null +++ b/jpush/index.js @@ -0,0 +1,376 @@ +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +var __metadata = (this && this.__metadata) || function (k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); +}; +import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core'; +import { Injectable } from '@angular/core'; +var JPush = (function (_super) { + __extends(JPush, _super); + function JPush() { + return _super !== null && _super.apply(this, arguments) || this; + } + JPush.prototype.init = function () { return; }; + JPush.prototype.setDebugMode = function (enable) { return; }; + JPush.prototype.getRegistrationID = function () { return; }; + JPush.prototype.stopPush = function () { return; }; + JPush.prototype.resumePush = function () { return; }; + JPush.prototype.isPushStopped = function () { return; }; + /** + * @param params { sequence: number, tags: [string, string] } + */ + JPush.prototype.setTags = function (params) { return; }; + /** + * @param params { sequence: number, tags: [string, string] } + */ + JPush.prototype.addTags = function (params) { return; }; + /** + * @param params { sequence: number, tags: [string, string] } + */ + JPush.prototype.deleteTags = function (params) { return; }; + /** + * @param params { sequence: number } + */ + JPush.prototype.cleanTags = function (params) { return; }; + /** + * @param params { sequence: number } + */ + JPush.prototype.getAllTags = function (params) { return; }; + /** + * @param params { sequence: number, tag: string } + */ + JPush.prototype.checkTagBindState = function (params) { return; }; + /** + * @param params { sequence: number, alias: string } + */ + JPush.prototype.setAlias = function (params) { return; }; + /** + * @param params { sequence: number } + */ + JPush.prototype.deleteAlias = function (params) { return; }; + /** + * @param params { sequence: number } + */ + JPush.prototype.getAlias = function (params) { return; }; + /** + * Determinate whether the application notification has been opened. + * + * iOS: 0: closed; >1: opened. + * UIRemoteNotificationTypeNone = 0, + * UIRemoteNotificationTypeBadge = 1 << 0, + * UIRemoteNotificationTypeSound = 1 << 1, + * UIRemoteNotificationTypeAlert = 1 << 2, + * UIRemoteNotificationTypeNewsstandContentAvailability = 1 << 3 + * + * Android: 0: closed; 1: opened. + */ + JPush.prototype.getUserNotificationSettings = function () { return; }; + JPush.prototype.clearLocalNotifications = function () { return; }; + // iOS API - start + JPush.prototype.setBadge = function (badge) { return; }; + JPush.prototype.resetBadge = function () { return; }; + JPush.prototype.setApplicationIconBadgeNumber = function (badge) { return; }; + JPush.prototype.getApplicationIconBadgeNumber = function () { return; }; + JPush.prototype.addLocalNotificationForIOS = function (delayTime, content, badge, notificationId, extras) { return; }; + JPush.prototype.deleteLocalNotificationWithIdentifierKeyInIOS = function (identifierKey) { return; }; + JPush.prototype.addDismissActions = function (actions, categoryId) { return; }; + JPush.prototype.addNotificationActions = function (actions, categoryId) { return; }; + JPush.prototype.setLocation = function (latitude, longitude) { return; }; + JPush.prototype.startLogPageView = function (pageName) { return; }; + JPush.prototype.stopLogPageView = function (pageName) { return; }; + JPush.prototype.beginLogPageView = function (pageName, duration) { return; }; + // iOS API - end + // Android API - start + JPush.prototype.getConnectionState = function () { return; }; + JPush.prototype.setBasicPushNotificationBuilder = function () { return; }; + JPush.prototype.setCustomPushNotificationBuilder = function () { return; }; + JPush.prototype.clearAllNotification = function () { return; }; + JPush.prototype.clearNotificationById = function (id) { return; }; + JPush.prototype.setLatestNotificationNum = function (num) { return; }; + JPush.prototype.addLocalNotification = function (builderId, content, title, notificationId, broadcastTime, extras) { return; }; + JPush.prototype.removeLocalNotification = function (notificationId) { return; }; + JPush.prototype.reportNotificationOpened = function (msgId) { return; }; + JPush.prototype.requestPermission = function () { return; }; + JPush.prototype.setSilenceTime = function (startHour, startMinute, endHour, endMinute) { return; }; + JPush.prototype.setPushTime = function (weekdays, startHour, endHour) { return; }; + // Android API - end + JPush.decorators = [ + { type: Injectable }, + ]; + /** @nocollapse */ + JPush.ctorParameters = function () { return []; }; + __decorate([ + Cordova(), + __metadata("design:type", Function), + __metadata("design:paramtypes", []), + __metadata("design:returntype", Promise) + ], JPush.prototype, "init", null); + __decorate([ + Cordova(), + __metadata("design:type", Function), + __metadata("design:paramtypes", [Boolean]), + __metadata("design:returntype", Promise) + ], JPush.prototype, "setDebugMode", null); + __decorate([ + Cordova(), + __metadata("design:type", Function), + __metadata("design:paramtypes", []), + __metadata("design:returntype", Promise) + ], JPush.prototype, "getRegistrationID", null); + __decorate([ + Cordova(), + __metadata("design:type", Function), + __metadata("design:paramtypes", []), + __metadata("design:returntype", Promise) + ], JPush.prototype, "stopPush", null); + __decorate([ + Cordova(), + __metadata("design:type", Function), + __metadata("design:paramtypes", []), + __metadata("design:returntype", Promise) + ], JPush.prototype, "resumePush", null); + __decorate([ + Cordova(), + __metadata("design:type", Function), + __metadata("design:paramtypes", []), + __metadata("design:returntype", Promise) + ], JPush.prototype, "isPushStopped", null); + __decorate([ + Cordova(), + __metadata("design:type", Function), + __metadata("design:paramtypes", [Object]), + __metadata("design:returntype", Promise) + ], JPush.prototype, "setTags", null); + __decorate([ + Cordova(), + __metadata("design:type", Function), + __metadata("design:paramtypes", [Object]), + __metadata("design:returntype", Promise) + ], JPush.prototype, "addTags", null); + __decorate([ + Cordova(), + __metadata("design:type", Function), + __metadata("design:paramtypes", [Object]), + __metadata("design:returntype", Promise) + ], JPush.prototype, "deleteTags", null); + __decorate([ + Cordova(), + __metadata("design:type", Function), + __metadata("design:paramtypes", [Object]), + __metadata("design:returntype", Promise) + ], JPush.prototype, "cleanTags", null); + __decorate([ + Cordova(), + __metadata("design:type", Function), + __metadata("design:paramtypes", [Object]), + __metadata("design:returntype", Promise) + ], JPush.prototype, "getAllTags", null); + __decorate([ + Cordova(), + __metadata("design:type", Function), + __metadata("design:paramtypes", [Object]), + __metadata("design:returntype", Promise) + ], JPush.prototype, "checkTagBindState", null); + __decorate([ + Cordova(), + __metadata("design:type", Function), + __metadata("design:paramtypes", [Object]), + __metadata("design:returntype", Promise) + ], JPush.prototype, "setAlias", null); + __decorate([ + Cordova(), + __metadata("design:type", Function), + __metadata("design:paramtypes", [Object]), + __metadata("design:returntype", Promise) + ], JPush.prototype, "deleteAlias", null); + __decorate([ + Cordova(), + __metadata("design:type", Function), + __metadata("design:paramtypes", [Object]), + __metadata("design:returntype", Promise) + ], JPush.prototype, "getAlias", null); + __decorate([ + Cordova(), + __metadata("design:type", Function), + __metadata("design:paramtypes", []), + __metadata("design:returntype", Promise) + ], JPush.prototype, "getUserNotificationSettings", null); + __decorate([ + Cordova(), + __metadata("design:type", Function), + __metadata("design:paramtypes", []), + __metadata("design:returntype", Promise) + ], JPush.prototype, "clearLocalNotifications", null); + __decorate([ + Cordova(), + __metadata("design:type", Function), + __metadata("design:paramtypes", [Number]), + __metadata("design:returntype", Promise) + ], JPush.prototype, "setBadge", null); + __decorate([ + Cordova(), + __metadata("design:type", Function), + __metadata("design:paramtypes", []), + __metadata("design:returntype", Promise) + ], JPush.prototype, "resetBadge", null); + __decorate([ + Cordova(), + __metadata("design:type", Function), + __metadata("design:paramtypes", [Number]), + __metadata("design:returntype", Promise) + ], JPush.prototype, "setApplicationIconBadgeNumber", null); + __decorate([ + Cordova(), + __metadata("design:type", Function), + __metadata("design:paramtypes", []), + __metadata("design:returntype", Promise) + ], JPush.prototype, "getApplicationIconBadgeNumber", null); + __decorate([ + Cordova(), + __metadata("design:type", Function), + __metadata("design:paramtypes", [Number, String, Number, Number, String]), + __metadata("design:returntype", Promise) + ], JPush.prototype, "addLocalNotificationForIOS", null); + __decorate([ + Cordova(), + __metadata("design:type", Function), + __metadata("design:paramtypes", [String]), + __metadata("design:returntype", Promise) + ], JPush.prototype, "deleteLocalNotificationWithIdentifierKeyInIOS", null); + __decorate([ + Cordova(), + __metadata("design:type", Function), + __metadata("design:paramtypes", [Array, String]), + __metadata("design:returntype", Promise) + ], JPush.prototype, "addDismissActions", null); + __decorate([ + Cordova(), + __metadata("design:type", Function), + __metadata("design:paramtypes", [Array, String]), + __metadata("design:returntype", Promise) + ], JPush.prototype, "addNotificationActions", null); + __decorate([ + Cordova(), + __metadata("design:type", Function), + __metadata("design:paramtypes", [Number, Number]), + __metadata("design:returntype", Promise) + ], JPush.prototype, "setLocation", null); + __decorate([ + Cordova(), + __metadata("design:type", Function), + __metadata("design:paramtypes", [String]), + __metadata("design:returntype", Promise) + ], JPush.prototype, "startLogPageView", null); + __decorate([ + Cordova(), + __metadata("design:type", Function), + __metadata("design:paramtypes", [String]), + __metadata("design:returntype", Promise) + ], JPush.prototype, "stopLogPageView", null); + __decorate([ + Cordova(), + __metadata("design:type", Function), + __metadata("design:paramtypes", [String, Number]), + __metadata("design:returntype", Promise) + ], JPush.prototype, "beginLogPageView", null); + __decorate([ + Cordova(), + __metadata("design:type", Function), + __metadata("design:paramtypes", []), + __metadata("design:returntype", Promise) + ], JPush.prototype, "getConnectionState", null); + __decorate([ + Cordova(), + __metadata("design:type", Function), + __metadata("design:paramtypes", []), + __metadata("design:returntype", Promise) + ], JPush.prototype, "setBasicPushNotificationBuilder", null); + __decorate([ + Cordova(), + __metadata("design:type", Function), + __metadata("design:paramtypes", []), + __metadata("design:returntype", Promise) + ], JPush.prototype, "setCustomPushNotificationBuilder", null); + __decorate([ + Cordova(), + __metadata("design:type", Function), + __metadata("design:paramtypes", []), + __metadata("design:returntype", Promise) + ], JPush.prototype, "clearAllNotification", null); + __decorate([ + Cordova(), + __metadata("design:type", Function), + __metadata("design:paramtypes", [Number]), + __metadata("design:returntype", Promise) + ], JPush.prototype, "clearNotificationById", null); + __decorate([ + Cordova(), + __metadata("design:type", Function), + __metadata("design:paramtypes", [Number]), + __metadata("design:returntype", Promise) + ], JPush.prototype, "setLatestNotificationNum", null); + __decorate([ + Cordova(), + __metadata("design:type", Function), + __metadata("design:paramtypes", [Number, String, String, Number, Number, String]), + __metadata("design:returntype", Promise) + ], JPush.prototype, "addLocalNotification", null); + __decorate([ + Cordova(), + __metadata("design:type", Function), + __metadata("design:paramtypes", [Number]), + __metadata("design:returntype", Promise) + ], JPush.prototype, "removeLocalNotification", null); + __decorate([ + Cordova(), + __metadata("design:type", Function), + __metadata("design:paramtypes", [Number]), + __metadata("design:returntype", Promise) + ], JPush.prototype, "reportNotificationOpened", null); + __decorate([ + Cordova(), + __metadata("design:type", Function), + __metadata("design:paramtypes", []), + __metadata("design:returntype", Promise) + ], JPush.prototype, "requestPermission", null); + __decorate([ + Cordova(), + __metadata("design:type", Function), + __metadata("design:paramtypes", [Number, Number, Number, Number]), + __metadata("design:returntype", Promise) + ], JPush.prototype, "setSilenceTime", null); + __decorate([ + Cordova(), + __metadata("design:type", Function), + __metadata("design:paramtypes", [Array, Number, Number]), + __metadata("design:returntype", Promise) + ], JPush.prototype, "setPushTime", null); + JPush = __decorate([ + Plugin({ + pluginName: 'JPush', + plugin: 'jpush-phonegap-plugin', + pluginRef: 'jPush', + repo: 'https://github.com/jpush/jpush-phonegap-plugin', + install: 'ionic cordova plugin add jpush-phonegap-plugin --variable APP_KEY=your_app_key', + installVariables: ['APP_KEY'], + platforms: ['Android', 'iOS'] + }) + ], JPush); + return JPush; +}(IonicNativePlugin)); +export { JPush }; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/jpush/index.js.map b/jpush/index.js.map new file mode 100644 index 0000000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YACN,UAAU,EAAE,OAAO;YACnB,MAAM,EAAE,uBAAuB;YAC/B,SAAS,EAAE,OAAO;YAClB,IAAI,EAAE,gDAAgD;YACtD,OAAO,EAAE,gFAAgF;YACzF,gBAAgB,EAAE,CAAC,SAAS,CAAC;YAC7B,SAAS,EAAE,CAAC,SAAS,EAAE,KAAK,CAAC;SAC9B,CAAC;OAEW,KAAK,CAiLjB;IAAD,YAAC;CAjLD,AAiLC,CAjL0B,iBAAiB,GAiL3C;SAjLY,KAAK","file":"index.js","sourceRoot":"","sourcesContent":["import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';\nimport { Injectable } from '@angular/core';\n\n@Plugin({\n pluginName: 'JPush',\n plugin: 'jpush-phonegap-plugin',\n pluginRef: 'jPush',\n repo: 'https://github.com/jpush/jpush-phonegap-plugin',\n install: 'ionic cordova plugin add jpush-phonegap-plugin --variable APP_KEY=your_app_key',\n installVariables: ['APP_KEY'],\n platforms: ['Android', 'iOS']\n})\n\nexport class JPush extends IonicNativePlugin {\n\n @Cordova()\n init(): Promise { return; }\n\n @Cordova()\n setDebugMode(enable: boolean): Promise { return; }\n\n @Cordova()\n getRegistrationID(): Promise { return; }\n\n @Cordova()\n stopPush(): Promise { return; }\n\n @Cordova()\n resumePush(): Promise { return; }\n\n @Cordova()\n isPushStopped(): Promise { return; }\n\n /**\n * @param params { sequence: number, tags: [string, string] }\n */\n @Cordova()\n setTags(params: object): Promise { return; }\n\n /**\n * @param params { sequence: number, tags: [string, string] }\n */\n @Cordova()\n addTags(params: object): Promise { return; }\n\n /**\n * @param params { sequence: number, tags: [string, string] }\n */\n @Cordova()\n deleteTags(params: object): Promise { return; }\n\n /**\n * @param params { sequence: number }\n */\n @Cordova()\n cleanTags(params: object): Promise { return; }\n\n /**\n * @param params { sequence: number }\n */\n @Cordova()\n getAllTags(params: object): Promise { return; }\n\n /**\n * @param params { sequence: number, tag: string }\n */\n @Cordova()\n checkTagBindState(params: object): Promise { return; }\n\n /**\n * @param params { sequence: number, alias: string }\n */\n @Cordova()\n setAlias(params: object): Promise { return; }\n\n /**\n * @param params { sequence: number }\n */\n @Cordova()\n deleteAlias(params: object): Promise { return; }\n\n /**\n * @param params { sequence: number }\n */\n @Cordova()\n getAlias(params: object): Promise { return; }\n\n /**\n * Determinate whether the application notification has been opened.\n * \n * iOS: 0: closed; >1: opened.\n * UIRemoteNotificationTypeNone = 0,\n * UIRemoteNotificationTypeBadge = 1 << 0,\n * UIRemoteNotificationTypeSound = 1 << 1,\n * UIRemoteNotificationTypeAlert = 1 << 2,\n * UIRemoteNotificationTypeNewsstandContentAvailability = 1 << 3\n * \n * Android: 0: closed; 1: opened.\n */\n @Cordova()\n getUserNotificationSettings(): Promise { return; }\n\n @Cordova()\n clearLocalNotifications(): Promise { return; }\n\n // iOS API - start\n\n @Cordova()\n setBadge(badge: number): Promise { return; }\n\n @Cordova()\n resetBadge(): Promise { return; }\n\n @Cordova()\n setApplicationIconBadgeNumber(badge: number): Promise { return; }\n\n @Cordova()\n getApplicationIconBadgeNumber(): Promise { return; }\n\n @Cordova()\n addLocalNotificationForIOS(delayTime: number, content: string, badge: number, notificationId: number, extras: string): Promise { return; }\n\n @Cordova()\n deleteLocalNotificationWithIdentifierKeyInIOS(identifierKey: string): Promise { return; }\n\n @Cordova()\n addDismissActions(actions: Array, categoryId: string): Promise { return; }\n\n @Cordova()\n addNotificationActions(actions: Array, categoryId: string): Promise { return; }\n\n @Cordova()\n setLocation(latitude: number, longitude: number): Promise { return; }\n\n @Cordova()\n startLogPageView(pageName: string): Promise { return; }\n\n @Cordova()\n stopLogPageView(pageName: string): Promise { return; }\n\n @Cordova()\n beginLogPageView(pageName: string, duration: number): Promise { return; }\n\n // iOS API - end\n\n // Android API - start\n\n @Cordova()\n getConnectionState(): Promise { return; }\n\n @Cordova()\n setBasicPushNotificationBuilder(): Promise { return; }\n\n @Cordova()\n setCustomPushNotificationBuilder(): Promise { return; }\n\n @Cordova()\n clearAllNotification(): Promise { return; }\n\n @Cordova()\n clearNotificationById(id: number): Promise { return; }\n\n @Cordova()\n setLatestNotificationNum(num: number): Promise { return; }\n\n @Cordova()\n addLocalNotification(builderId: number, content: string, title: string, notificationId: number, broadcastTime: number, extras: string): Promise { return; }\n\n @Cordova()\n removeLocalNotification(notificationId: number): Promise { return; }\n\n @Cordova()\n reportNotificationOpened(msgId: number): Promise { return; }\n\n @Cordova()\n requestPermission(): Promise { return; }\n\n @Cordova()\n setSilenceTime(startHour: number, startMinute: number, endHour: number, endMinute: number): Promise { return; }\n\n @Cordova()\n setPushTime(weekdays: Array, startHour: number, endHour: number): Promise { return; }\n\n // Android API - end\nstatic decorators: DecoratorInvocation[] = [\n{ type: Injectable },\n];\n/** @nocollapse */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n];\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]} \ No newline at end of file diff --git a/jpush/index.metadata.json b/jpush/index.metadata.json new file mode 100644 index 0000000..340b7aa --- /dev/null +++ b/jpush/index.metadata.json @@ -0,0 +1 @@ +[{"__symbolic":"module","version":3,"metadata":{"JPush":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"@ionic-native/core","name":"IonicNativePlugin"},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Plugin"},"arguments":[{"pluginName":"JPush","plugin":"jpush-phonegap-plugin","pluginRef":"jPush","repo":"https://github.com/jpush/jpush-phonegap-plugin","install":"ionic cordova plugin add jpush-phonegap-plugin --variable APP_KEY=your_app_key","installVariables":["APP_KEY"],"platforms":["Android","iOS"]}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"init":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"setDebugMode":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"getRegistrationID":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"stopPush":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"resumePush":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"isPushStopped":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"setTags":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"addTags":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"deleteTags":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"cleanTags":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"getAllTags":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"checkTagBindState":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"setAlias":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"deleteAlias":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"getAlias":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"getUserNotificationSettings":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"clearLocalNotifications":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"setBadge":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"resetBadge":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"setApplicationIconBadgeNumber":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"getApplicationIconBadgeNumber":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"addLocalNotificationForIOS":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"deleteLocalNotificationWithIdentifierKeyInIOS":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"addDismissActions":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"addNotificationActions":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"setLocation":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"startLogPageView":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"stopLogPageView":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"beginLogPageView":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"getConnectionState":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"setBasicPushNotificationBuilder":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"setCustomPushNotificationBuilder":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"clearAllNotification":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"clearNotificationById":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"setLatestNotificationNum":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"addLocalNotification":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"removeLocalNotification":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"reportNotificationOpened":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"requestPermission":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"setSilenceTime":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"setPushTime":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}]}}}},{"__symbolic":"module","version":1,"metadata":{"JPush":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"@ionic-native/core","name":"IonicNativePlugin"},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Plugin"},"arguments":[{"pluginName":"JPush","plugin":"jpush-phonegap-plugin","pluginRef":"jPush","repo":"https://github.com/jpush/jpush-phonegap-plugin","install":"ionic cordova plugin add jpush-phonegap-plugin --variable APP_KEY=your_app_key","installVariables":["APP_KEY"],"platforms":["Android","iOS"]}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"init":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"setDebugMode":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"getRegistrationID":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"stopPush":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"resumePush":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"isPushStopped":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"setTags":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"addTags":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"deleteTags":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"cleanTags":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"getAllTags":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"checkTagBindState":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"setAlias":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"deleteAlias":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"getAlias":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"getUserNotificationSettings":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"clearLocalNotifications":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"setBadge":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"resetBadge":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"setApplicationIconBadgeNumber":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"getApplicationIconBadgeNumber":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"addLocalNotificationForIOS":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"deleteLocalNotificationWithIdentifierKeyInIOS":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"addDismissActions":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"addNotificationActions":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"setLocation":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"startLogPageView":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"stopLogPageView":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"beginLogPageView":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"getConnectionState":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"setBasicPushNotificationBuilder":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"setCustomPushNotificationBuilder":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"clearAllNotification":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"clearNotificationById":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"setLatestNotificationNum":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"addLocalNotification":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"removeLocalNotification":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"reportNotificationOpened":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"requestPermission":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"setSilenceTime":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"setPushTime":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}]}}}}] \ No newline at end of file diff --git a/jpush/package.json b/jpush/package.json new file mode 100644 index 0000000..879845e --- /dev/null +++ b/jpush/package.json @@ -0,0 +1,18 @@ +{ + "name": "@jiguang-ionic/jpush", + "version": "1.0.0", + "description": "JPush support for ionic-native", + "module": "index.js", + "typings": "index.d.ts", + "author": "hevin", + "license": "MIT", + "peerDependencies": { + "@ionic-native/core": "^4.2.0", + "@angular/core": "*", + "rxjs": "^5.0.1" + }, + "repository": { + "type": "git", + "url": "https://github.com/jpush/jpush-phonegap-plugin" + } +} From 29970cd306194f2ec46eaf8e7776915b06be6ba6 Mon Sep 17 00:00:00 2001 From: Hevin Date: Fri, 8 Dec 2017 21:35:42 +0800 Subject: [PATCH 04/21] Fixed params error --- index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.ts b/index.ts index e1615ac..5d875c6 100644 --- a/index.ts +++ b/index.ts @@ -14,7 +14,7 @@ export interface AliasOptions { @Plugin({ pluginName: 'JPush', plugin: 'jpush-phonegap-plugin', - pluginRef: 'jPush', + pluginRef: 'plugins.jPushPlugin', repo: 'https://github.com/jpush/jpush-phonegap-plugin', install: 'ionic cordova plugin add jpush-phonegap-plugin --variable APP_KEY=your_app_key', installVariables: ['APP_KEY'], @@ -104,7 +104,7 @@ export class JPush extends IonicNativePlugin { getApplicationIconBadgeNumber(): Promise { return; } @Cordova() - addLocalNotificationForIOS(delayTime: number, content: string, badge: number, notificationId: number, extras?: string): Promise { return; } + addLocalNotificationForIOS(delayTime: number, content: string, badge: number, identifierKey: string, extras?: string): Promise { return; } @Cordova() deleteLocalNotificationWithIdentifierKeyInIOS(identifierKey: string): Promise { return; } From 6d013438cd8a7ea0072f249d70314f901dc5b46d Mon Sep 17 00:00:00 2001 From: Hevin Date: Fri, 8 Dec 2017 21:38:40 +0800 Subject: [PATCH 05/21] Fixed checkTagBindState callback error --- src/android/JPushEventReceiver.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/android/JPushEventReceiver.java b/src/android/JPushEventReceiver.java index d69349c..1cc3035 100644 --- a/src/android/JPushEventReceiver.java +++ b/src/android/JPushEventReceiver.java @@ -96,6 +96,7 @@ public class JPushEventReceiver extends JPushMessageReceiver { } catch (JSONException e) { e.printStackTrace(); } + callback.success(resultJson); } else { try { @@ -103,7 +104,6 @@ public class JPushEventReceiver extends JPushMessageReceiver { } catch (JSONException e) { e.printStackTrace(); } - callback.error(resultJson); } From c254794ace31e89dc14b0202e842a8f398d55ce3 Mon Sep 17 00:00:00 2001 From: Hevin Date: Mon, 11 Dec 2017 12:31:54 +0800 Subject: [PATCH 06/21] create ionic floder --- doc/iOS_API.md | 2 +- example/js/.DS_Store | Bin 6148 -> 0 bytes ionic/example | 1 + {jpush => ionic/jpush}/index.d.ts | 52 +++++++-------------- {jpush => ionic/jpush}/index.js | 26 +---------- ionic/jpush/index.js.map | 1 + {jpush => ionic/jpush}/index.metadata.json | 2 +- ionic/jpush/jiguang-ionic-jpush-1.0.0.tgz | Bin 0 -> 5193 bytes {jpush => ionic/jpush}/package.json | 0 jpush/index.js.map | 1 - src/ios/Plugins/JPushPlugin.m | 2 +- 11 files changed, 24 insertions(+), 63 deletions(-) delete mode 100644 example/js/.DS_Store create mode 160000 ionic/example rename {jpush => ionic/jpush}/index.d.ts (71%) rename {jpush => ionic/jpush}/index.js (96%) create mode 100644 ionic/jpush/index.js.map rename {jpush => ionic/jpush}/index.metadata.json (58%) create mode 100644 ionic/jpush/jiguang-ionic-jpush-1.0.0.tgz rename {jpush => ionic/jpush}/package.json (100%) delete mode 100644 jpush/index.js.map diff --git a/doc/iOS_API.md b/doc/iOS_API.md index 8c79704..c1b5ee9 100644 --- a/doc/iOS_API.md +++ b/doc/iOS_API.md @@ -379,7 +379,7 @@ window.JPush.addLocalNotificationForIOS(delayTime, content, badge, notificationI #### 参数说明 -- delayTime: 本地推送延迟多长时间后显示,数值类型或纯数字的字符型均可。 +- delayTime: 本地推送延迟多长时间后显示,数值类型或纯数字的字符型均可,单位为秒。 - content: 本地推送需要显示的内容。 - badge: 角标的数字。如果不需要改变角标传-1。数值类型或纯数字的字符型均可。 - notificationID: 本地推送标识符,字符串。 diff --git a/example/js/.DS_Store b/example/js/.DS_Store deleted file mode 100644 index 924b172042ef1e88c7895ff35bf0d96bb75d28ad..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHKyG{c!5S)b+K{TllrOPxR^N09$V#R=@(loGLUq6Qb_P&`}*Mv{K^@AGpLb-mklfLVvMKYd_(NU$Mm_ z_SWCuw_V>dDr!EdOR5b6EpYZD;{`ohJfUNa3#`b&P74?Nwd{uZ%b`fA6($%627-ZL zAQ(6-13a@O^HayL!9Xw&416=7{UK3>O~ve3whkIypB0}8CG>S+7N&|##q7uk#XObh zsaBsD=IQKDbzD<1J9;{-%*;A<=H27P%Ixeypt17ik`y}8i&f5l&B@{vDI ziB>QW4E!?&Y__@Gtoc#(Z2k3lI%^a4jw;c(EQdmWbO~TX`^b3-dOXSJxTa!uR2B7? QbYfft3L#;Ffdeq`1&6*U3IG5A diff --git a/ionic/example b/ionic/example new file mode 160000 index 0000000..a65634c --- /dev/null +++ b/ionic/example @@ -0,0 +1 @@ +Subproject commit a65634c0e15fc4cd737befe19802be7682e2269d diff --git a/jpush/index.d.ts b/ionic/jpush/index.d.ts similarity index 71% rename from jpush/index.d.ts rename to ionic/jpush/index.d.ts index 9d2b94e..db7461b 100644 --- a/jpush/index.d.ts +++ b/ionic/jpush/index.d.ts @@ -1,4 +1,12 @@ import { IonicNativePlugin } from '@ionic-native/core'; +export interface TagOptions { + sequence: number; + tags?: Array; +} +export interface AliasOptions { + sequence: number; + alias?: string; +} export declare class JPush extends IonicNativePlugin { init(): Promise; setDebugMode(enable: boolean): Promise; @@ -6,42 +14,18 @@ export declare class JPush extends IonicNativePlugin { stopPush(): Promise; resumePush(): Promise; isPushStopped(): Promise; - /** - * @param params { sequence: number, tags: [string, string] } - */ - setTags(params: object): Promise; - /** - * @param params { sequence: number, tags: [string, string] } - */ - addTags(params: object): Promise; - /** - * @param params { sequence: number, tags: [string, string] } - */ - deleteTags(params: object): Promise; - /** - * @param params { sequence: number } - */ - cleanTags(params: object): Promise; - /** - * @param params { sequence: number } - */ - getAllTags(params: object): Promise; + setTags(params: TagOptions): Promise; + addTags(params: TagOptions): Promise; + deleteTags(params: TagOptions): Promise; + cleanTags(params: TagOptions): Promise; + getAllTags(params: TagOptions): Promise; /** * @param params { sequence: number, tag: string } */ checkTagBindState(params: object): Promise; - /** - * @param params { sequence: number, alias: string } - */ - setAlias(params: object): Promise; - /** - * @param params { sequence: number } - */ - deleteAlias(params: object): Promise; - /** - * @param params { sequence: number } - */ - getAlias(params: object): Promise; + setAlias(params: AliasOptions): Promise; + deleteAlias(params: AliasOptions): Promise; + getAlias(params: AliasOptions): Promise; /** * Determinate whether the application notification has been opened. * @@ -60,7 +44,7 @@ export declare class JPush extends IonicNativePlugin { resetBadge(): Promise; setApplicationIconBadgeNumber(badge: number): Promise; getApplicationIconBadgeNumber(): Promise; - addLocalNotificationForIOS(delayTime: number, content: string, badge: number, notificationId: number, extras: string): Promise; + addLocalNotificationForIOS(delayTime: number, content: string, badge: number, notificationId: number, extras?: string): Promise; deleteLocalNotificationWithIdentifierKeyInIOS(identifierKey: string): Promise; addDismissActions(actions: Array, categoryId: string): Promise; addNotificationActions(actions: Array, categoryId: string): Promise; @@ -74,7 +58,7 @@ export declare class JPush extends IonicNativePlugin { clearAllNotification(): Promise; clearNotificationById(id: number): Promise; setLatestNotificationNum(num: number): Promise; - addLocalNotification(builderId: number, content: string, title: string, notificationId: number, broadcastTime: number, extras: string): Promise; + addLocalNotification(builderId: number, content: string, title: string, notificationId: number, broadcastTime: number, extras?: string): Promise; removeLocalNotification(notificationId: number): Promise; reportNotificationOpened(msgId: number): Promise; requestPermission(): Promise; diff --git a/jpush/index.js b/ionic/jpush/index.js similarity index 96% rename from jpush/index.js rename to ionic/jpush/index.js index a1aadca..f0de886 100644 --- a/jpush/index.js +++ b/ionic/jpush/index.js @@ -30,41 +30,17 @@ var JPush = (function (_super) { JPush.prototype.stopPush = function () { return; }; JPush.prototype.resumePush = function () { return; }; JPush.prototype.isPushStopped = function () { return; }; - /** - * @param params { sequence: number, tags: [string, string] } - */ JPush.prototype.setTags = function (params) { return; }; - /** - * @param params { sequence: number, tags: [string, string] } - */ JPush.prototype.addTags = function (params) { return; }; - /** - * @param params { sequence: number, tags: [string, string] } - */ JPush.prototype.deleteTags = function (params) { return; }; - /** - * @param params { sequence: number } - */ JPush.prototype.cleanTags = function (params) { return; }; - /** - * @param params { sequence: number } - */ JPush.prototype.getAllTags = function (params) { return; }; /** * @param params { sequence: number, tag: string } */ JPush.prototype.checkTagBindState = function (params) { return; }; - /** - * @param params { sequence: number, alias: string } - */ JPush.prototype.setAlias = function (params) { return; }; - /** - * @param params { sequence: number } - */ JPush.prototype.deleteAlias = function (params) { return; }; - /** - * @param params { sequence: number } - */ JPush.prototype.getAlias = function (params) { return; }; /** * Determinate whether the application notification has been opened. @@ -363,7 +339,7 @@ var JPush = (function (_super) { Plugin({ pluginName: 'JPush', plugin: 'jpush-phonegap-plugin', - pluginRef: 'jPush', + pluginRef: 'plugins.jPushPlugin', repo: 'https://github.com/jpush/jpush-phonegap-plugin', install: 'ionic cordova plugin add jpush-phonegap-plugin --variable APP_KEY=your_app_key', installVariables: ['APP_KEY'], diff --git a/ionic/jpush/index.js.map b/ionic/jpush/index.js.map new file mode 100644 index 0000000..1c8d866 --- /dev/null +++ b/ionic/jpush/index.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../../src/@ionic-native/plugins/jpush/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,MAAA,EAAQ,OAAA,EAAS,iBAAA,EAAkB,MAAO,oBAAA,CAAqB;AACxE,OAAO,EAAE,UAAA,EAAW,MAAO,eAAA,CAAgB;AAsB3C;IAA2B,yBAAiB;IAA5C;;IAyJA,CAAC;IAtJC,oBAAI,GAAJ,cAAuB,MAAM,CAAC,CAAC,CAAC;IAGhC,4BAAY,GAAZ,UAAa,MAAe,IAAkB,MAAM,CAAC,CAAC,CAAC;IAGvD,iCAAiB,GAAjB,cAAoC,MAAM,CAAC,CAAC,CAAC;IAG7C,wBAAQ,GAAR,cAA2B,MAAM,CAAC,CAAC,CAAC;IAGpC,0BAAU,GAAV,cAA6B,MAAM,CAAC,CAAC,CAAC;IAGtC,6BAAa,GAAb,cAAgC,MAAM,CAAC,CAAC,CAAC;IAGzC,uBAAO,GAAP,UAAQ,MAAkB,IAAkB,MAAM,CAAC,CAAC,CAAC;IAGrD,uBAAO,GAAP,UAAQ,MAAkB,IAAkB,MAAM,CAAC,CAAC,CAAC;IAGrD,0BAAU,GAAV,UAAW,MAAkB,IAAkB,MAAM,CAAC,CAAC,CAAC;IAGxD,yBAAS,GAAT,UAAU,MAAkB,IAAkB,MAAM,CAAC,CAAC,CAAC;IAGvD,0BAAU,GAAV,UAAW,MAAkB,IAAkB,MAAM,CAAC,CAAC,CAAC;IAExD;;OAEG;IAEH,iCAAiB,GAAjB,UAAkB,MAAc,IAAkB,MAAM,CAAC,CAAC,CAAC;IAG3D,wBAAQ,GAAR,UAAS,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pH;QADC,OAAO,EAAE;;yCACY,KAAK;;4CAAuE;IAhJvF,KAAK;QAVjB,MAAM,CAAC;YACN,UAAU,EAAE,OAAO;YACnB,MAAM,EAAE,uBAAuB;YAC/B,SAAS,EAAE,qBAAqB;YAChC,IAAI,EAAE,gDAAgD;YACtD,OAAO,EAAE,gFAAgF;YACzF,gBAAgB,EAAE,CAAC,SAAS,CAAC;YAC7B,SAAS,EAAE,CAAC,SAAS,EAAE,KAAK,CAAC;SAC9B,CAAC;OAEW,KAAK,CAyJjB;IAAD,YAAC;CAzJD,AAyJC,CAzJ0B,iBAAiB,GAyJ3C;SAzJY,KAAK","file":"index.js","sourceRoot":"","sourcesContent":["import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';\nimport { Injectable } from '@angular/core';\n\nexport interface TagOptions {\n sequence: number;\n tags?: Array;\n}\n\nexport interface AliasOptions {\n sequence: number;\n alias?: string;\n}\n\n@Plugin({\n pluginName: 'JPush',\n plugin: 'jpush-phonegap-plugin',\n pluginRef: 'plugins.jPushPlugin',\n repo: 'https://github.com/jpush/jpush-phonegap-plugin',\n install: 'ionic cordova plugin add jpush-phonegap-plugin --variable APP_KEY=your_app_key',\n installVariables: ['APP_KEY'],\n platforms: ['Android', 'iOS']\n})\n\nexport class JPush extends IonicNativePlugin {\n\n @Cordova()\n init(): Promise { return; }\n\n @Cordova()\n setDebugMode(enable: boolean): Promise { return; }\n\n @Cordova()\n getRegistrationID(): Promise { return; }\n\n @Cordova()\n stopPush(): Promise { return; }\n\n @Cordova()\n resumePush(): Promise { return; }\n\n @Cordova()\n isPushStopped(): Promise { return; }\n\n @Cordova()\n setTags(params: TagOptions): Promise { return; }\n\n @Cordova()\n addTags(params: TagOptions): Promise { return; }\n\n @Cordova()\n deleteTags(params: TagOptions): Promise { return; }\n\n @Cordova()\n cleanTags(params: TagOptions): Promise { return; }\n\n @Cordova()\n getAllTags(params: TagOptions): Promise { return; }\n\n /**\n * @param params { sequence: number, tag: string }\n */\n @Cordova()\n checkTagBindState(params: object): Promise { return; }\n\n @Cordova()\n setAlias(params: AliasOptions): Promise { return; }\n\n @Cordova()\n deleteAlias(params: AliasOptions): Promise { return; }\n\n @Cordova()\n getAlias(params: AliasOptions): Promise { return; }\n\n /**\n * Determinate whether the application notification has been opened.\n * \n * iOS: 0: closed; >1: opened.\n * UIRemoteNotificationTypeNone = 0,\n * UIRemoteNotificationTypeBadge = 1 << 0,\n * UIRemoteNotificationTypeSound = 1 << 1,\n * UIRemoteNotificationTypeAlert = 1 << 2,\n * UIRemoteNotificationTypeNewsstandContentAvailability = 1 << 3\n * \n * Android: 0: closed; 1: opened.\n */\n @Cordova()\n getUserNotificationSettings(): Promise { return; }\n\n @Cordova()\n clearLocalNotifications(): Promise { return; }\n\n // iOS API - start\n\n @Cordova()\n setBadge(badge: number): Promise { return; }\n\n @Cordova()\n resetBadge(): Promise { return; }\n\n @Cordova()\n setApplicationIconBadgeNumber(badge: number): Promise { return; }\n\n @Cordova()\n getApplicationIconBadgeNumber(): Promise { return; }\n\n @Cordova()\n addLocalNotificationForIOS(delayTime: number, content: string, badge: number, notificationId: number, extras?: string): Promise { return; }\n\n @Cordova()\n deleteLocalNotificationWithIdentifierKeyInIOS(identifierKey: string): Promise { return; }\n\n @Cordova()\n addDismissActions(actions: Array, categoryId: string): Promise { return; }\n\n @Cordova()\n addNotificationActions(actions: Array, categoryId: string): Promise { return; }\n\n @Cordova()\n setLocation(latitude: number, longitude: number): Promise { return; }\n\n @Cordova()\n startLogPageView(pageName: string): Promise { return; }\n\n @Cordova()\n stopLogPageView(pageName: string): Promise { return; }\n\n @Cordova()\n beginLogPageView(pageName: string, duration: number): Promise { return; }\n\n // iOS API - end\n\n // Android API - start\n\n @Cordova()\n getConnectionState(): Promise { return; }\n\n @Cordova()\n setBasicPushNotificationBuilder(): Promise { return; }\n\n @Cordova()\n setCustomPushNotificationBuilder(): Promise { return; }\n\n @Cordova()\n clearAllNotification(): Promise { return; }\n\n @Cordova()\n clearNotificationById(id: number): Promise { return; }\n\n @Cordova()\n setLatestNotificationNum(num: number): Promise { return; }\n\n @Cordova()\n addLocalNotification(builderId: number, content: string, title: string, notificationId: number, broadcastTime: number, extras?: string): Promise { return; }\n\n @Cordova()\n removeLocalNotification(notificationId: number): Promise { return; }\n\n @Cordova()\n reportNotificationOpened(msgId: number): Promise { return; }\n\n @Cordova()\n requestPermission(): Promise { return; }\n\n @Cordova()\n setSilenceTime(startHour: number, startMinute: number, endHour: number, endMinute: number): Promise { return; }\n\n @Cordova()\n setPushTime(weekdays: Array, startHour: number, endHour: number): Promise { return; }\n\n // Android API - end\nstatic decorators: DecoratorInvocation[] = [\n{ type: Injectable },\n];\n/** @nocollapse */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n];\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]} \ No newline at end of file diff --git a/jpush/index.metadata.json b/ionic/jpush/index.metadata.json similarity index 58% rename from jpush/index.metadata.json rename to ionic/jpush/index.metadata.json index 340b7aa..2cc22fa 100644 --- a/jpush/index.metadata.json +++ b/ionic/jpush/index.metadata.json @@ -1 +1 @@ -[{"__symbolic":"module","version":3,"metadata":{"JPush":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"@ionic-native/core","name":"IonicNativePlugin"},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Plugin"},"arguments":[{"pluginName":"JPush","plugin":"jpush-phonegap-plugin","pluginRef":"jPush","repo":"https://github.com/jpush/jpush-phonegap-plugin","install":"ionic cordova plugin add jpush-phonegap-plugin --variable APP_KEY=your_app_key","installVariables":["APP_KEY"],"platforms":["Android","iOS"]}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"init":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"setDebugMode":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"getRegistrationID":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"stopPush":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"resumePush":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"isPushStopped":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"setTags":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"addTags":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"deleteTags":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"cleanTags":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"getAllTags":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"checkTagBindState":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"setAlias":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"deleteAlias":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"getAlias":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"getUserNotificationSettings":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"clearLocalNotifications":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"setBadge":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"resetBadge":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"setApplicationIconBadgeNumber":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"getApplicationIconBadgeNumber":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"addLocalNotificationForIOS":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"deleteLocalNotificationWithIdentifierKeyInIOS":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"addDismissActions":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"addNotificationActions":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"setLocation":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"startLogPageView":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"stopLogPageView":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"beginLogPageView":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"getConnectionState":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"setBasicPushNotificationBuilder":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"setCustomPushNotificationBuilder":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"clearAllNotification":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"clearNotificationById":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"setLatestNotificationNum":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"addLocalNotification":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"removeLocalNotification":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"reportNotificationOpened":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"requestPermission":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"setSilenceTime":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"setPushTime":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}]}}}},{"__symbolic":"module","version":1,"metadata":{"JPush":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"@ionic-native/core","name":"IonicNativePlugin"},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Plugin"},"arguments":[{"pluginName":"JPush","plugin":"jpush-phonegap-plugin","pluginRef":"jPush","repo":"https://github.com/jpush/jpush-phonegap-plugin","install":"ionic cordova plugin add jpush-phonegap-plugin --variable APP_KEY=your_app_key","installVariables":["APP_KEY"],"platforms":["Android","iOS"]}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"init":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"setDebugMode":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"getRegistrationID":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"stopPush":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"resumePush":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"isPushStopped":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"setTags":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"addTags":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"deleteTags":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"cleanTags":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"getAllTags":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"checkTagBindState":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"setAlias":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"deleteAlias":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"getAlias":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"getUserNotificationSettings":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"clearLocalNotifications":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"setBadge":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"resetBadge":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"setApplicationIconBadgeNumber":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"getApplicationIconBadgeNumber":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"addLocalNotificationForIOS":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"deleteLocalNotificationWithIdentifierKeyInIOS":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"addDismissActions":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"addNotificationActions":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"setLocation":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"startLogPageView":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"stopLogPageView":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"beginLogPageView":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"getConnectionState":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"setBasicPushNotificationBuilder":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"setCustomPushNotificationBuilder":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"clearAllNotification":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"clearNotificationById":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"setLatestNotificationNum":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"addLocalNotification":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"removeLocalNotification":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"reportNotificationOpened":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"requestPermission":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"setSilenceTime":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"setPushTime":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}]}}}}] \ No newline at end of file +[{"__symbolic":"module","version":3,"metadata":{"TagOptions":{"__symbolic":"interface"},"AliasOptions":{"__symbolic":"interface"},"JPush":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"@ionic-native/core","name":"IonicNativePlugin"},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Plugin"},"arguments":[{"pluginName":"JPush","plugin":"jpush-phonegap-plugin","pluginRef":"plugins.jPushPlugin","repo":"https://github.com/jpush/jpush-phonegap-plugin","install":"ionic cordova plugin add jpush-phonegap-plugin --variable APP_KEY=your_app_key","installVariables":["APP_KEY"],"platforms":["Android","iOS"]}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"init":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"setDebugMode":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"getRegistrationID":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"stopPush":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"resumePush":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"isPushStopped":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"setTags":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"addTags":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"deleteTags":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"cleanTags":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"getAllTags":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"checkTagBindState":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"setAlias":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"deleteAlias":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"getAlias":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"getUserNotificationSettings":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"clearLocalNotifications":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"setBadge":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"resetBadge":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"setApplicationIconBadgeNumber":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"getApplicationIconBadgeNumber":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"addLocalNotificationForIOS":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"deleteLocalNotificationWithIdentifierKeyInIOS":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"addDismissActions":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"addNotificationActions":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"setLocation":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"startLogPageView":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"stopLogPageView":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"beginLogPageView":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"getConnectionState":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"setBasicPushNotificationBuilder":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"setCustomPushNotificationBuilder":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"clearAllNotification":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"clearNotificationById":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"setLatestNotificationNum":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"addLocalNotification":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"removeLocalNotification":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"reportNotificationOpened":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"requestPermission":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"setSilenceTime":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"setPushTime":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}]}}}},{"__symbolic":"module","version":1,"metadata":{"TagOptions":{"__symbolic":"interface"},"AliasOptions":{"__symbolic":"interface"},"JPush":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"@ionic-native/core","name":"IonicNativePlugin"},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Plugin"},"arguments":[{"pluginName":"JPush","plugin":"jpush-phonegap-plugin","pluginRef":"plugins.jPushPlugin","repo":"https://github.com/jpush/jpush-phonegap-plugin","install":"ionic cordova plugin add jpush-phonegap-plugin --variable APP_KEY=your_app_key","installVariables":["APP_KEY"],"platforms":["Android","iOS"]}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"init":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"setDebugMode":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"getRegistrationID":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"stopPush":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"resumePush":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"isPushStopped":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"setTags":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"addTags":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"deleteTags":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"cleanTags":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"getAllTags":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"checkTagBindState":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"setAlias":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"deleteAlias":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"getAlias":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"getUserNotificationSettings":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"clearLocalNotifications":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"setBadge":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"resetBadge":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"setApplicationIconBadgeNumber":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"getApplicationIconBadgeNumber":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"addLocalNotificationForIOS":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"deleteLocalNotificationWithIdentifierKeyInIOS":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"addDismissActions":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"addNotificationActions":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"setLocation":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"startLogPageView":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"stopLogPageView":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"beginLogPageView":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"getConnectionState":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"setBasicPushNotificationBuilder":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"setCustomPushNotificationBuilder":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"clearAllNotification":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"clearNotificationById":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"setLatestNotificationNum":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"addLocalNotification":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"removeLocalNotification":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"reportNotificationOpened":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"requestPermission":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"setSilenceTime":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}],"setPushTime":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@ionic-native/core","name":"Cordova"}}]}]}}}}] \ No newline at end of file diff --git a/ionic/jpush/jiguang-ionic-jpush-1.0.0.tgz b/ionic/jpush/jiguang-ionic-jpush-1.0.0.tgz new file mode 100644 index 0000000000000000000000000000000000000000..fb6c166bda42f6122128b009e862e6e24a04e7d7 GIT binary patch literal 5193 zcmV-P6t?RhiwFP!000006YV`~QyaOm`#HZt*SG4#Bon_NFMG+x9zzy#5=aP}lS??% zU<)%~&p7iSaajNN+bwC{Z^tCFE>BT-EOocKC3Q<`$*rj}xK>8AKINaaD^u5gTk_Lr zG@fj2k+}2*%WII|nwza=tF`&G)olLOXf_`|eoB68ESr(I$2Kj+09JmK4wr?vpZ}2O z_8uV>O_|V2n^az2sUus_MvqioQwQ~{scl|XB!sx3h6#xX)T}jX4W2rr=D<*=mdM#Z z1bAZF)2VJ){Kq{LG0&F|fH`wP9VdzHTYGSc<`N%L`2=>Jx$we@5Z z^}p3n+(s4SCBH?J|Xv`%5%SSkA7o#s%BB+LK#r3zk(P62UGBW>YldfSXv)@h20HuG?fqovL*Bz^hnTMi+fIyNH z^U)g80jM)2@ZU5EH%|1M1?Itwk(L*sYN}P;Xp=*bTs7(MiZ*-E5rtcQdTx*2=tEki znsPn{KF)Q0OcgB_VMML>bff}X3JS5;PoQh*Q)DeZ*Py07p~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+Hc?(Z^(~?^~pgb|HBelfUnZDG|?Lg9xMQF!a=4ikIyS^RGGJ zQCEI0Mh#e5vo?>V z7`%rek!I)?20`tmJJ{^NAXy39IGB9TCtlya`c1Tmv!W8!KINa za*s$_&Hr#{IYCE!q(qhz5ZQs{vH(MI<+8v-Vdb*GLs8{2xy}<*E?7tDG365bc7c0E z@>qZzH;%;gn@B{t1hvV&qa=svPq@7#kJc`BuSp)I%YEZXj$wedotuuL)px}Kpix|>hep5~M@b&|D*klu5;C7pAq8azz%+-_vfy0C9qsTAX~=Vk7c>)=oR0wP-9p zmv}G|UmN4^ZNDJZTTTnOm3-y@k-)(GZ+1A8al#3l@Pe6mo}(!Snfse~Y0fcN?rk!d z2Mahj5tJ&Y^Iv_G>L2+8&;L1xf|q*@c*gxdo6V=;^M9L-r_J^Gzn}4(+*Z!c%-Q5z zhvi76?cC2T1&#$e-J;UIt$2PJ{1(7K2xANCOI z;0P@I>0DY;8wKuq_qvEXI#%X$Ji|(HfM$J<#b=Fl5m1av9r^po{YcD1kW1t<5MQ;d zOh&_`mX%XC+G$xC^aU*~D~rL{qh;mN2_9Nj{+#HaW#!KozO$?>dhs{Q%AqfSW?5N` zM!+m9r)~(#vNGt8L0MKFM`f?Xv{;a3=yZ(rKrR6akGOxUh24mipmCs19y0S7F6LYSt ztY(FdD>2{c5#Y+ocx)iIQZpNg#8y^r6GN$$mEqVJXJutJDM(p)`Avv2R$hj~!NSVQ zX(*~!iP?1HaFvtCIXvNgyXZD^bG^;H-ez8JGq1Oq*W1ixVQ{_8ygbDz_4eL+n|Zy> zTm}}`+ssQ=nR4^E-ez8JGq1Oqmt>9pc^kItZRVdk7Oc0Ked?(w?r@#8=)az&cte^Gsk9qzdY;5!n0KfnM D { return; }\n\n @Cordova()\n setDebugMode(enable: boolean): Promise { return; }\n\n @Cordova()\n getRegistrationID(): Promise { return; }\n\n @Cordova()\n stopPush(): Promise { return; }\n\n @Cordova()\n resumePush(): Promise { return; }\n\n @Cordova()\n isPushStopped(): Promise { return; }\n\n /**\n * @param params { sequence: number, tags: [string, string] }\n */\n @Cordova()\n setTags(params: object): Promise { return; }\n\n /**\n * @param params { sequence: number, tags: [string, string] }\n */\n @Cordova()\n addTags(params: object): Promise { return; }\n\n /**\n * @param params { sequence: number, tags: [string, string] }\n */\n @Cordova()\n deleteTags(params: object): Promise { return; }\n\n /**\n * @param params { sequence: number }\n */\n @Cordova()\n cleanTags(params: object): Promise { return; }\n\n /**\n * @param params { sequence: number }\n */\n @Cordova()\n getAllTags(params: object): Promise { return; }\n\n /**\n * @param params { sequence: number, tag: string }\n */\n @Cordova()\n checkTagBindState(params: object): Promise { return; }\n\n /**\n * @param params { sequence: number, alias: string }\n */\n @Cordova()\n setAlias(params: object): Promise { return; }\n\n /**\n * @param params { sequence: number }\n */\n @Cordova()\n deleteAlias(params: object): Promise { return; }\n\n /**\n * @param params { sequence: number }\n */\n @Cordova()\n getAlias(params: object): Promise { return; }\n\n /**\n * Determinate whether the application notification has been opened.\n * \n * iOS: 0: closed; >1: opened.\n * UIRemoteNotificationTypeNone = 0,\n * UIRemoteNotificationTypeBadge = 1 << 0,\n * UIRemoteNotificationTypeSound = 1 << 1,\n * UIRemoteNotificationTypeAlert = 1 << 2,\n * UIRemoteNotificationTypeNewsstandContentAvailability = 1 << 3\n * \n * Android: 0: closed; 1: opened.\n */\n @Cordova()\n getUserNotificationSettings(): Promise { return; }\n\n @Cordova()\n clearLocalNotifications(): Promise { return; }\n\n // iOS API - start\n\n @Cordova()\n setBadge(badge: number): Promise { return; }\n\n @Cordova()\n resetBadge(): Promise { return; }\n\n @Cordova()\n setApplicationIconBadgeNumber(badge: number): Promise { return; }\n\n @Cordova()\n getApplicationIconBadgeNumber(): Promise { return; }\n\n @Cordova()\n addLocalNotificationForIOS(delayTime: number, content: string, badge: number, notificationId: number, extras: string): Promise { return; }\n\n @Cordova()\n deleteLocalNotificationWithIdentifierKeyInIOS(identifierKey: string): Promise { return; }\n\n @Cordova()\n addDismissActions(actions: Array, categoryId: string): Promise { return; }\n\n @Cordova()\n addNotificationActions(actions: Array, categoryId: string): Promise { return; }\n\n @Cordova()\n setLocation(latitude: number, longitude: number): Promise { return; }\n\n @Cordova()\n startLogPageView(pageName: string): Promise { return; }\n\n @Cordova()\n stopLogPageView(pageName: string): Promise { return; }\n\n @Cordova()\n beginLogPageView(pageName: string, duration: number): Promise { return; }\n\n // iOS API - end\n\n // Android API - start\n\n @Cordova()\n getConnectionState(): Promise { return; }\n\n @Cordova()\n setBasicPushNotificationBuilder(): Promise { return; }\n\n @Cordova()\n setCustomPushNotificationBuilder(): Promise { return; }\n\n @Cordova()\n clearAllNotification(): Promise { return; }\n\n @Cordova()\n clearNotificationById(id: number): Promise { return; }\n\n @Cordova()\n setLatestNotificationNum(num: number): Promise { return; }\n\n @Cordova()\n addLocalNotification(builderId: number, content: string, title: string, notificationId: number, broadcastTime: number, extras: string): Promise { return; }\n\n @Cordova()\n removeLocalNotification(notificationId: number): Promise { return; }\n\n @Cordova()\n reportNotificationOpened(msgId: number): Promise { return; }\n\n @Cordova()\n requestPermission(): Promise { return; }\n\n @Cordova()\n setSilenceTime(startHour: number, startMinute: number, endHour: number, endMinute: number): Promise { return; }\n\n @Cordova()\n setPushTime(weekdays: Array, startHour: number, endHour: number): Promise { return; }\n\n // Android API - end\nstatic decorators: DecoratorInvocation[] = [\n{ type: Injectable },\n];\n/** @nocollapse */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n];\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]} \ No newline at end of file diff --git a/src/ios/Plugins/JPushPlugin.m b/src/ios/Plugins/JPushPlugin.m index 64d3791..3e62c77 100644 --- a/src/ios/Plugins/JPushPlugin.m +++ b/src/ios/Plugins/JPushPlugin.m @@ -241,7 +241,7 @@ CDVPluginResult* result; if (iResCode == 0) { - [dic setObject:[iTags allObjects] forKey:@"tags"]; + dic[@"tag"] = tag; [dic setObject:[NSNumber numberWithBool:isBind] forKey:@"isBind"]; result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:dic]; } else { From 4cfca937897c2a7b539c9b160de25ffc74dd5a4a Mon Sep 17 00:00:00 2001 From: Hevin Date: Mon, 11 Dec 2017 13:02:50 +0800 Subject: [PATCH 07/21] Complete ionic example --- ionic/example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ionic/example b/ionic/example index a65634c..148e087 160000 --- a/ionic/example +++ b/ionic/example @@ -1 +1 @@ -Subproject commit a65634c0e15fc4cd737befe19802be7682e2269d +Subproject commit 148e087db2e678772a09fa83d3cff17c496acbb6 From a0c828a29697a5c8f831bcbaa55835ae9e95352f Mon Sep 17 00:00:00 2001 From: Hevin Date: Mon, 11 Dec 2017 15:22:11 +0800 Subject: [PATCH 08/21] Update gitignore --- .gitignore | 10 ++++++++++ ionic/example | 1 - 2 files changed, 10 insertions(+), 1 deletion(-) delete mode 160000 ionic/example diff --git a/.gitignore b/.gitignore index d912879..d65bfa3 100644 --- a/.gitignore +++ b/.gitignore @@ -36,4 +36,14 @@ Network Trash Folder Temporary Items .apdisk +# Ionic example +./ionic/example/node_modules +./ionic/example/plugins +./ionic/example/config.xml +./ionic/example/ionic.config.json +./ionic/example/package-lock.json +./ionic/example/package.json +./ionic/example/tsconfig.json +./ionic/example/tslint.json + # End of https://www.gitignore.io/api/macos,apachecordova diff --git a/ionic/example b/ionic/example deleted file mode 160000 index 148e087..0000000 --- a/ionic/example +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 148e087db2e678772a09fa83d3cff17c496acbb6 From 509184328d4cf6d4b588d5ae4d4af32c427b39aa Mon Sep 17 00:00:00 2001 From: Hevin Date: Mon, 11 Dec 2017 18:44:33 +0800 Subject: [PATCH 09/21] Fix params type error --- index.ts => ionic/index.ts | 0 ionic/jpush/index.d.ts | 2 +- ionic/jpush/index.js | 4 ++-- ionic/jpush/index.js.map | 2 +- ionic/jpush/package.json | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) rename index.ts => ionic/index.ts (100%) diff --git a/index.ts b/ionic/index.ts similarity index 100% rename from index.ts rename to ionic/index.ts diff --git a/ionic/jpush/index.d.ts b/ionic/jpush/index.d.ts index db7461b..33aa538 100644 --- a/ionic/jpush/index.d.ts +++ b/ionic/jpush/index.d.ts @@ -44,7 +44,7 @@ export declare class JPush extends IonicNativePlugin { resetBadge(): Promise; setApplicationIconBadgeNumber(badge: number): Promise; getApplicationIconBadgeNumber(): Promise; - addLocalNotificationForIOS(delayTime: number, content: string, badge: number, notificationId: number, extras?: string): Promise; + addLocalNotificationForIOS(delayTime: number, content: string, badge: number, identifierKey: string, extras?: string): Promise; deleteLocalNotificationWithIdentifierKeyInIOS(identifierKey: string): Promise; addDismissActions(actions: Array, categoryId: string): Promise; addNotificationActions(actions: Array, categoryId: string): Promise; diff --git a/ionic/jpush/index.js b/ionic/jpush/index.js index f0de886..6f8fede 100644 --- a/ionic/jpush/index.js +++ b/ionic/jpush/index.js @@ -61,7 +61,7 @@ var JPush = (function (_super) { JPush.prototype.resetBadge = function () { return; }; JPush.prototype.setApplicationIconBadgeNumber = function (badge) { return; }; JPush.prototype.getApplicationIconBadgeNumber = function () { return; }; - JPush.prototype.addLocalNotificationForIOS = function (delayTime, content, badge, notificationId, extras) { return; }; + JPush.prototype.addLocalNotificationForIOS = function (delayTime, content, badge, identifierKey, extras) { return; }; JPush.prototype.deleteLocalNotificationWithIdentifierKeyInIOS = function (identifierKey) { return; }; JPush.prototype.addDismissActions = function (actions, categoryId) { return; }; JPush.prototype.addNotificationActions = function (actions, categoryId) { return; }; @@ -218,7 +218,7 @@ var JPush = (function (_super) { __decorate([ Cordova(), __metadata("design:type", Function), - __metadata("design:paramtypes", [Number, String, Number, Number, String]), + __metadata("design:paramtypes", [Number, String, Number, String, String]), __metadata("design:returntype", Promise) ], JPush.prototype, "addLocalNotificationForIOS", null); __decorate([ diff --git a/ionic/jpush/index.js.map b/ionic/jpush/index.js.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,EAAE,qBAAqB;YAChC,IAAI,EAAE,gDAAgD;YACtD,OAAO,EAAE,gFAAgF;YACzF,gBAAgB,EAAE,CAAC,SAAS,CAAC;YAC7B,SAAS,EAAE,CAAC,SAAS,EAAE,KAAK,CAAC;SAC9B,CAAC;OAEW,KAAK,CAyJjB;IAAD,YAAC;CAzJD,AAyJC,CAzJ0B,iBAAiB,GAyJ3C;SAzJY,KAAK","file":"index.js","sourceRoot":"","sourcesContent":["import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';\nimport { Injectable } from '@angular/core';\n\nexport interface TagOptions {\n sequence: number;\n tags?: Array;\n}\n\nexport interface AliasOptions {\n sequence: number;\n alias?: string;\n}\n\n@Plugin({\n pluginName: 'JPush',\n plugin: 'jpush-phonegap-plugin',\n pluginRef: 'plugins.jPushPlugin',\n repo: 'https://github.com/jpush/jpush-phonegap-plugin',\n install: 'ionic cordova plugin add jpush-phonegap-plugin --variable APP_KEY=your_app_key',\n installVariables: ['APP_KEY'],\n platforms: ['Android', 'iOS']\n})\n\nexport class JPush extends IonicNativePlugin {\n\n @Cordova()\n init(): Promise { return; }\n\n @Cordova()\n setDebugMode(enable: boolean): Promise { return; }\n\n @Cordova()\n getRegistrationID(): Promise { return; }\n\n @Cordova()\n stopPush(): Promise { return; }\n\n @Cordova()\n resumePush(): Promise { return; }\n\n @Cordova()\n isPushStopped(): Promise { return; }\n\n @Cordova()\n setTags(params: TagOptions): Promise { return; }\n\n @Cordova()\n addTags(params: TagOptions): Promise { return; }\n\n @Cordova()\n deleteTags(params: TagOptions): Promise { return; }\n\n @Cordova()\n cleanTags(params: TagOptions): Promise { return; }\n\n @Cordova()\n getAllTags(params: TagOptions): Promise { return; }\n\n /**\n * @param params { sequence: number, tag: string }\n */\n @Cordova()\n checkTagBindState(params: object): Promise { return; }\n\n @Cordova()\n setAlias(params: AliasOptions): Promise { return; }\n\n @Cordova()\n deleteAlias(params: AliasOptions): Promise { return; }\n\n @Cordova()\n getAlias(params: AliasOptions): Promise { return; }\n\n /**\n * Determinate whether the application notification has been opened.\n * \n * iOS: 0: closed; >1: opened.\n * UIRemoteNotificationTypeNone = 0,\n * UIRemoteNotificationTypeBadge = 1 << 0,\n * UIRemoteNotificationTypeSound = 1 << 1,\n * UIRemoteNotificationTypeAlert = 1 << 2,\n * UIRemoteNotificationTypeNewsstandContentAvailability = 1 << 3\n * \n * Android: 0: closed; 1: opened.\n */\n @Cordova()\n getUserNotificationSettings(): Promise { return; }\n\n @Cordova()\n clearLocalNotifications(): Promise { return; }\n\n // iOS API - start\n\n @Cordova()\n setBadge(badge: number): Promise { return; }\n\n @Cordova()\n resetBadge(): Promise { return; }\n\n @Cordova()\n setApplicationIconBadgeNumber(badge: number): Promise { return; }\n\n @Cordova()\n getApplicationIconBadgeNumber(): Promise { return; }\n\n @Cordova()\n addLocalNotificationForIOS(delayTime: number, content: string, badge: number, notificationId: number, extras?: string): Promise { return; }\n\n @Cordova()\n deleteLocalNotificationWithIdentifierKeyInIOS(identifierKey: string): Promise { return; }\n\n @Cordova()\n addDismissActions(actions: Array, categoryId: string): Promise { return; }\n\n @Cordova()\n addNotificationActions(actions: Array, categoryId: string): Promise { return; }\n\n @Cordova()\n setLocation(latitude: number, longitude: number): Promise { return; }\n\n @Cordova()\n startLogPageView(pageName: string): Promise { return; }\n\n @Cordova()\n stopLogPageView(pageName: string): Promise { return; }\n\n @Cordova()\n beginLogPageView(pageName: string, duration: number): Promise { return; }\n\n // iOS API - end\n\n // Android API - start\n\n @Cordova()\n getConnectionState(): Promise { return; }\n\n @Cordova()\n setBasicPushNotificationBuilder(): Promise { return; }\n\n @Cordova()\n setCustomPushNotificationBuilder(): Promise { return; }\n\n @Cordova()\n clearAllNotification(): Promise { return; }\n\n @Cordova()\n clearNotificationById(id: number): Promise { return; }\n\n @Cordova()\n setLatestNotificationNum(num: number): Promise { return; }\n\n @Cordova()\n addLocalNotification(builderId: number, content: string, title: string, notificationId: number, broadcastTime: number, extras?: string): Promise { return; }\n\n @Cordova()\n removeLocalNotification(notificationId: number): Promise { return; }\n\n @Cordova()\n reportNotificationOpened(msgId: number): Promise { return; }\n\n @Cordova()\n requestPermission(): Promise { return; }\n\n @Cordova()\n setSilenceTime(startHour: number, startMinute: number, endHour: number, endMinute: number): Promise { return; }\n\n @Cordova()\n setPushTime(weekdays: Array, startHour: number, endHour: number): Promise { return; }\n\n // Android API - end\nstatic decorators: DecoratorInvocation[] = [\n{ type: Injectable },\n];\n/** @nocollapse */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n];\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]} \ No newline at end of file +{"version":3,"sources":["../../../src/@ionic-native/plugins/jpush/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,MAAA,EAAQ,OAAA,EAAS,iBAAA,EAAkB,MAAO,oBAAA,CAAqB;AACxE,OAAO,EAAE,UAAA,EAAW,MAAO,eAAA,CAAgB;AAsB3C;IAA2B,yBAAiB;IAA5C;;IAyJA,CAAC;IAtJC,oBAAI,GAAJ,cAAuB,MAAM,CAAC,CAAC,CAAC;IAGhC,4BAAY,GAAZ,UAAa,MAAe,IAAkB,MAAM,CAAC,CAAC,CAAC;IAGvD,iCAAiB,GAAjB,cAAoC,MAAM,CAAC,CAAC,CAAC;IAG7C,wBAAQ,GAAR,cAA2B,MAAM,CAAC,CAAC,CAAC;IAGpC,0BAAU,GAAV,cAA6B,MAAM,CAAC,CAAC,CAAC;IAGtC,6BAAa,GAAb,cAAgC,MAAM,CAAC,CAAC,CAAC;IAGzC,uBAAO,GAAP,UAAQ,MAAkB,IAAkB,MAAM,CAAC,CAAC,CAAC;IAGrD,uBAAO,GAAP,UAAQ,MAAkB,IAAkB,MAAM,CAAC,CAAC,CAAC;IAGrD,0BAAU,GAAV,UAAW,MAAkB,IAAkB,MAAM,CAAC,CAAC,CAAC;IAGxD,yBAAS,GAAT,UAAU,MAAkB,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O,EAAE;;;;yDACqD;IAG/D;QADC,OAAO,EAAE;;;;qDACuJ;IAGjK;QADC,OAAO,EAAE;;;;wDAC+D;IAGzE;QADC,OAAO,EAAE;;;;yDACuD;IAGjE;QADC,OAAO,EAAE;;;;kDACmC;IAG7C;QADC,OAAO,EAAE;;;;+CAC0G;IAGpH;QADC,OAAO,EAAE;;yCACY,KAAK;;4CAAuE;IAhJvF,KAAK;QAVjB,MAAM,CAAC;YACN,UAAU,EAAE,OAAO;YACnB,MAAM,EAAE,uBAAuB;YAC/B,SAAS,EAAE,qBAAqB;YAChC,IAAI,EAAE,gDAAgD;YACtD,OAAO,EAAE,gFAAgF;YACzF,gBAAgB,EAAE,CAAC,SAAS,CAAC;YAC7B,SAAS,EAAE,CAAC,SAAS,EAAE,KAAK,CAAC;SAC9B,CAAC;OAEW,KAAK,CAyJjB;IAAD,YAAC;CAzJD,AAyJC,CAzJ0B,iBAAiB,GAyJ3C;SAzJY,KAAK","file":"index.js","sourceRoot":"","sourcesContent":["import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';\nimport { Injectable } from '@angular/core';\n\nexport interface TagOptions {\n sequence: number;\n tags?: Array;\n}\n\nexport interface AliasOptions {\n sequence: number;\n alias?: string;\n}\n\n@Plugin({\n pluginName: 'JPush',\n plugin: 'jpush-phonegap-plugin',\n pluginRef: 'plugins.jPushPlugin',\n repo: 'https://github.com/jpush/jpush-phonegap-plugin',\n install: 'ionic cordova plugin add jpush-phonegap-plugin --variable APP_KEY=your_app_key',\n installVariables: ['APP_KEY'],\n platforms: ['Android', 'iOS']\n})\n\nexport class JPush extends IonicNativePlugin {\n\n @Cordova()\n init(): Promise { return; }\n\n @Cordova()\n setDebugMode(enable: boolean): Promise { return; }\n\n @Cordova()\n getRegistrationID(): Promise { return; }\n\n @Cordova()\n stopPush(): Promise { return; }\n\n @Cordova()\n resumePush(): Promise { return; }\n\n @Cordova()\n isPushStopped(): Promise { return; }\n\n @Cordova()\n setTags(params: TagOptions): Promise { return; }\n\n @Cordova()\n addTags(params: TagOptions): Promise { return; }\n\n @Cordova()\n deleteTags(params: TagOptions): Promise { return; }\n\n @Cordova()\n cleanTags(params: TagOptions): Promise { return; }\n\n @Cordova()\n getAllTags(params: TagOptions): Promise { return; }\n\n /**\n * @param params { sequence: number, tag: string }\n */\n @Cordova()\n checkTagBindState(params: object): Promise { return; }\n\n @Cordova()\n setAlias(params: AliasOptions): Promise { return; }\n\n @Cordova()\n deleteAlias(params: AliasOptions): Promise { return; }\n\n @Cordova()\n getAlias(params: AliasOptions): Promise { return; }\n\n /**\n * Determinate whether the application notification has been opened.\n * \n * iOS: 0: closed; >1: opened.\n * UIRemoteNotificationTypeNone = 0,\n * UIRemoteNotificationTypeBadge = 1 << 0,\n * UIRemoteNotificationTypeSound = 1 << 1,\n * UIRemoteNotificationTypeAlert = 1 << 2,\n * UIRemoteNotificationTypeNewsstandContentAvailability = 1 << 3\n * \n * Android: 0: closed; 1: opened.\n */\n @Cordova()\n getUserNotificationSettings(): Promise { return; }\n\n @Cordova()\n clearLocalNotifications(): Promise { return; }\n\n // iOS API - start\n\n @Cordova()\n setBadge(badge: number): Promise { return; }\n\n @Cordova()\n resetBadge(): Promise { return; }\n\n @Cordova()\n setApplicationIconBadgeNumber(badge: number): Promise { return; }\n\n @Cordova()\n getApplicationIconBadgeNumber(): Promise { return; }\n\n @Cordova()\n addLocalNotificationForIOS(delayTime: number, content: string, badge: number, identifierKey: string, extras?: string): Promise { return; }\n\n @Cordova()\n deleteLocalNotificationWithIdentifierKeyInIOS(identifierKey: string): Promise { return; }\n\n @Cordova()\n addDismissActions(actions: Array, categoryId: string): Promise { return; }\n\n @Cordova()\n addNotificationActions(actions: Array, categoryId: string): Promise { return; }\n\n @Cordova()\n setLocation(latitude: number, longitude: number): Promise { return; }\n\n @Cordova()\n startLogPageView(pageName: string): Promise { return; }\n\n @Cordova()\n stopLogPageView(pageName: string): Promise { return; }\n\n @Cordova()\n beginLogPageView(pageName: string, duration: number): Promise { return; }\n\n // iOS API - end\n\n // Android API - start\n\n @Cordova()\n getConnectionState(): Promise { return; }\n\n @Cordova()\n setBasicPushNotificationBuilder(): Promise { return; }\n\n @Cordova()\n setCustomPushNotificationBuilder(): Promise { return; }\n\n @Cordova()\n clearAllNotification(): Promise { return; }\n\n @Cordova()\n clearNotificationById(id: number): Promise { return; }\n\n @Cordova()\n setLatestNotificationNum(num: number): Promise { return; }\n\n @Cordova()\n addLocalNotification(builderId: number, content: string, title: string, notificationId: number, broadcastTime: number, extras?: string): Promise { return; }\n\n @Cordova()\n removeLocalNotification(notificationId: number): Promise { return; }\n\n @Cordova()\n reportNotificationOpened(msgId: number): Promise { return; }\n\n @Cordova()\n requestPermission(): Promise { return; }\n\n @Cordova()\n setSilenceTime(startHour: number, startMinute: number, endHour: number, endMinute: number): Promise { return; }\n\n @Cordova()\n setPushTime(weekdays: Array, startHour: number, endHour: number): Promise { return; }\n\n // Android API - end\nstatic decorators: DecoratorInvocation[] = [\n{ type: Injectable },\n];\n/** @nocollapse */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n];\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]} \ No newline at end of file diff --git a/ionic/jpush/package.json b/ionic/jpush/package.json index 879845e..34e4f5f 100644 --- a/ionic/jpush/package.json +++ b/ionic/jpush/package.json @@ -1,6 +1,6 @@ { "name": "@jiguang-ionic/jpush", - "version": "1.0.0", + "version": "1.0.1", "description": "JPush support for ionic-native", "module": "index.js", "typings": "index.d.ts", From c0c7d904e3146ab0ede6d0725371a517be8b14b6 Mon Sep 17 00:00:00 2001 From: Hevin Date: Mon, 11 Dec 2017 19:06:04 +0800 Subject: [PATCH 10/21] Complete example --- .gitignore | 36 +++++-- ionic/example/src/app/app.component.ts | 25 +++++ ionic/example/src/app/app.html | 1 + ionic/example/src/app/app.module.ts | 34 +++++++ ionic/example/src/pages/home/home.html | 36 +++++++ ionic/example/src/pages/home/home.scss | 3 + ionic/example/src/pages/home/home.ts | 132 +++++++++++++++++++++++++ 7 files changed, 259 insertions(+), 8 deletions(-) create mode 100644 ionic/example/src/app/app.component.ts create mode 100644 ionic/example/src/app/app.html create mode 100644 ionic/example/src/app/app.module.ts create mode 100644 ionic/example/src/pages/home/home.html create mode 100644 ionic/example/src/pages/home/home.scss create mode 100644 ionic/example/src/pages/home/home.ts diff --git a/.gitignore b/.gitignore index d65bfa3..bc5ffa0 100644 --- a/.gitignore +++ b/.gitignore @@ -37,13 +37,33 @@ Temporary Items .apdisk # Ionic example -./ionic/example/node_modules -./ionic/example/plugins -./ionic/example/config.xml -./ionic/example/ionic.config.json -./ionic/example/package-lock.json -./ionic/example/package.json -./ionic/example/tsconfig.json -./ionic/example/tslint.json +ionic/example/.sourcemaps/* +ionic/example/node_modules/* +ionic/example/plugins/* +ionic/example/config.xml +ionic/example/ionic.config.json +ionic/example/package-lock.json +ionic/example/package.json +ionic/example/tsconfig.json +ionic/example/tslint.json +ionic/example/resources/README\.md +ionic/example/www/* +ionic/example/src/assets/* +ionic/example/src/theme +ionic/example/platforms + +ionic/example/src/manifest\.json + +ionic/example/resources/android/splash/ + +ionic/example/resources/ + +ionic/example/src/service-worker\.js + +ionic/example/src/index\.html + +ionic/example/src/app/app\.scss + +ionic/example/src/app/main\.ts # End of https://www.gitignore.io/api/macos,apachecordova diff --git a/ionic/example/src/app/app.component.ts b/ionic/example/src/app/app.component.ts new file mode 100644 index 0000000..5283370 --- /dev/null +++ b/ionic/example/src/app/app.component.ts @@ -0,0 +1,25 @@ +import { Component } from '@angular/core'; +import { Platform } from 'ionic-angular'; +import { StatusBar } from '@ionic-native/status-bar'; +import { SplashScreen } from '@ionic-native/splash-screen'; +import { JPush } from '@jiguang-ionic/jpush'; + +import { HomePage } from '../pages/home/home'; +@Component({ + templateUrl: 'app.html' +}) +export class MyApp { + rootPage:any = HomePage; + + constructor(platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen, jpush: JPush) { + platform.ready().then(() => { + // Okay, so the platform is ready and our plugins are available. + // Here you can do any higher level native things you might need. + statusBar.styleDefault(); + splashScreen.hide(); + + jpush.init(); + jpush.setDebugMode(true); + }); + } +} diff --git a/ionic/example/src/app/app.html b/ionic/example/src/app/app.html new file mode 100644 index 0000000..7b88c96 --- /dev/null +++ b/ionic/example/src/app/app.html @@ -0,0 +1 @@ + diff --git a/ionic/example/src/app/app.module.ts b/ionic/example/src/app/app.module.ts new file mode 100644 index 0000000..ce364d8 --- /dev/null +++ b/ionic/example/src/app/app.module.ts @@ -0,0 +1,34 @@ +import { BrowserModule } from '@angular/platform-browser'; +import { ErrorHandler, NgModule } from '@angular/core'; +import { IonicApp, IonicErrorHandler, IonicModule } from 'ionic-angular'; +import { SplashScreen } from '@ionic-native/splash-screen'; +import { StatusBar } from '@ionic-native/status-bar'; +import { Device } from '@ionic-native/device'; +import { JPush } from '@jiguang-ionic/jpush'; + +import { MyApp } from './app.component'; +import { HomePage } from '../pages/home/home'; + +@NgModule({ + declarations: [ + MyApp, + HomePage + ], + imports: [ + BrowserModule, + IonicModule.forRoot(MyApp) + ], + bootstrap: [IonicApp], + entryComponents: [ + MyApp, + HomePage + ], + providers: [ + StatusBar, + SplashScreen, + Device, + JPush, + {provide: ErrorHandler, useClass: IonicErrorHandler} + ] +}) +export class AppModule {} diff --git a/ionic/example/src/pages/home/home.html b/ionic/example/src/pages/home/home.html new file mode 100644 index 0000000..6219446 --- /dev/null +++ b/ionic/example/src/pages/home/home.html @@ -0,0 +1,36 @@ + + + + JPush Ionic Example + + + + + + + + +
Registration Id: {{registrationId}}
+ +
+ + + + + + + + + + + + + + + + + + + +
+
diff --git a/ionic/example/src/pages/home/home.scss b/ionic/example/src/pages/home/home.scss new file mode 100644 index 0000000..d4cc8fc --- /dev/null +++ b/ionic/example/src/pages/home/home.scss @@ -0,0 +1,3 @@ +page-home { + +} diff --git a/ionic/example/src/pages/home/home.ts b/ionic/example/src/pages/home/home.ts new file mode 100644 index 0000000..b0bd0c2 --- /dev/null +++ b/ionic/example/src/pages/home/home.ts @@ -0,0 +1,132 @@ +import { Component } from '@angular/core'; +import { NavController } from 'ionic-angular'; +import { JPush } from '@jiguang-ionic/jpush'; +import { Device } from '@ionic-native/device'; + +@Component({ + selector: 'page-home', + templateUrl: 'home.html' +}) +export class HomePage { + + public registrationId: string; + + devicePlatform: string; + sequence: number = 0; + + tagResultHandler = function(result) { + var sequence: number = result.sequence; + var tags: Array = result.tags == null ? [] : result.tags; + alert('Success!' + '\nSequence: ' + sequence + '\nTags: ' + tags.toString()); + }; + + aliasResultHandler = function(result) { + var sequence: number = result.sequence; + var alias: string = result.alias; + alert('Success!' + '\nSequence: ' + sequence + '\nAlias: ' + alias); + }; + + errorHandler = function(err) { + var sequence: number = err.sequence; + var code = err.code; + alert('Error!' + '\nSequence: ' + sequence + '\nCode: ' + code); + }; + + constructor(public navCtrl: NavController, public jpush: JPush, device: Device) { + + this.devicePlatform = device.platform; + + document.addEventListener('jpush.receiveNotification', (event: any) => { + var content; + if (this.devicePlatform == 'Android') { + content = event.alert; + } else { + content = event.aps.alert; + } + console.log('Receive notification: ' + content); + }, false); + + document.addEventListener('jpush.openNotification', (event: any) => { + var content; + if (this.devicePlatform == 'Android') { + content = event.alert; + } else { + content = event.aps.alert; + } + alert('Open notification: ' + content); + }, false); + } + + getRegistrationID() { + this.jpush.getRegistrationID() + .then(rId => { + this.registrationId = rId; + }); + } + + setTags() { + this.jpush.setTags({ sequence: this.sequence++, tags: ['Tag1', 'Tag2']}) + .then(this.tagResultHandler) + .catch(this.errorHandler); + } + + addTags() { + this.jpush.addTags({ sequence: this.sequence++, tags: ['Tag3', 'Tag4']}) + .then(this.tagResultHandler) + .catch(this.errorHandler); + } + + checkTagBindState() { + this.jpush.checkTagBindState({ sequence: this.sequence++, tag: 'Tag1' }) + .then(result => { + var sequence = result.sequence; + var tag = result.tag; + var isBind = result.isBind; + alert('Sequence: ' + sequence + '\nTag: ' + tag + '\nIsBind: ' + isBind); + }).catch(this.errorHandler); + } + + deleteTags() { + this.jpush.deleteTags({ sequence: this.sequence++, tags: ['Tag4']}) + .then(this.tagResultHandler) + .catch(this.errorHandler); + } + + getAllTags() { + this.jpush.getAllTags({ sequence: this.sequence++ }) + .then(this.tagResultHandler) + .catch(this.errorHandler); + } + + cleanTags() { + this.jpush.cleanTags({ sequence: this.sequence++ }) + .then(this.tagResultHandler) + .catch(this.errorHandler); + } + + setAlias() { + this.jpush.setAlias({ sequence: this.sequence++, alias: 'TestAlias' }) + .then(this.aliasResultHandler) + .catch(this.errorHandler); + } + + getAlias() { + this.jpush.getAlias({ sequence: this.sequence++ }) + .then(this.aliasResultHandler) + .catch(this.errorHandler); + } + + deleteAlias() { + this.jpush.deleteAlias({ sequence: this.sequence++ }) + .then(this.aliasResultHandler) + .catch(this.errorHandler); + } + + addLocalNotification() { + if (this.devicePlatform == 'Android') { + this.jpush.addLocalNotification(0, 'Hello JPush', 'JPush', 1, 5000); + } else { + this.jpush.addLocalNotificationForIOS(5, 'Hello JPush', 1, 'noti1'); + } + } +} From 9c103753e61297c96b6b591a2cc9aae61d870b9e Mon Sep 17 00:00:00 2001 From: huangminlinux <380108184@qq.com> Date: Tue, 12 Dec 2017 14:20:04 +0800 Subject: [PATCH 11/21] update iOS docs --- doc/iOS_API.md | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/doc/iOS_API.md b/doc/iOS_API.md index c1b5ee9..1650521 100644 --- a/doc/iOS_API.md +++ b/doc/iOS_API.md @@ -143,7 +143,7 @@ window.JPush.getRegistrationID(function(data) { #### event - jpush.openNotification -点击通知启动或唤醒应用程序时会触发该事件 +点击通知(包括 localNotification 和 remoteNotification)启动或唤醒应用程序时会触发该事件 #### 代码示例 @@ -433,6 +433,34 @@ window.JPush.clearAllLocalNotifications() 监听 `jpush.receiveLocalNotification` 事件获取,「App 在后台时点击通知横幅」或「App 在前台时收到」均会触发该事件。 +#### 代码示例 + +- 在你需要接收通知的的 js 文件中加入: + +```js +document.addEventListener("jpush.receiveLocalNotification", onLocalNotification, false) +``` + +- onLocalNotification 需要这样写: + +```js +var onLocalNotification = function(event) { + alert("receive Local Notification:" + JSON.stringify(event)) +} +``` + +- event 举例 + +```json +{ + badge = 1; + content = "Hello JPush"; + extras = { + "__JPUSHNotificationKey" = notificationIdentify_1; + }; +} +``` + ### iOS 10 收到本地通知 监听 [jpush.receiveNotification](#前台收到推送)、[jpush.openNotification](点击推送通知),获取推送内容后,通过获取到的 `__JPUSHNotificationKey` 字段([本地通知](#本地通知) 设置的 `notificationID`)来判断是本地通知,并处理。 From 9ea65add1f02ab1eb32d779b4c3e9588f8529a53 Mon Sep 17 00:00:00 2001 From: huangminlinux <380108184@qq.com> Date: Tue, 12 Dec 2017 14:26:55 +0800 Subject: [PATCH 12/21] update demo add receiveLocalNotification Event --- ionic/example/src/pages/home/home.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ionic/example/src/pages/home/home.ts b/ionic/example/src/pages/home/home.ts index b0bd0c2..8d725a7 100644 --- a/ionic/example/src/pages/home/home.ts +++ b/ionic/example/src/pages/home/home.ts @@ -55,6 +55,16 @@ export class HomePage { } alert('Open notification: ' + content); }, false); + + document.addEventListener('jpush.receiveLocalNotification', (event: any) => { + // iOS(*,9) Only , iOS(10,*) 将在 jpush.openNotification 和 jpush.receiveNotification 中触发。 + var content; + if (this.devicePlatform == 'Android') { + } else { + content = event.content; + } + alert('receive local notification: ' + JSON.stringify(event)); + }, false); } getRegistrationID() { From f50a8ea5c77b230228a9e27ce7a89900c09ca8a5 Mon Sep 17 00:00:00 2001 From: huangminlinux <380108184@qq.com> Date: Tue, 12 Dec 2017 17:00:28 +0800 Subject: [PATCH 13/21] fix local notification event in ios 10 --- ionic/example/src/pages/home/home.ts | 5 ++-- src/ios/Plugins/AppDelegate+JPush.m | 39 +++++++++++++++++++++------- 2 files changed, 32 insertions(+), 12 deletions(-) diff --git a/ionic/example/src/pages/home/home.ts b/ionic/example/src/pages/home/home.ts index 8d725a7..22b1577 100644 --- a/ionic/example/src/pages/home/home.ts +++ b/ionic/example/src/pages/home/home.ts @@ -43,7 +43,7 @@ export class HomePage { } else { content = event.aps.alert; } - console.log('Receive notification: ' + content); + alert('Receive notification: ' + JSON.stringify(event)); }, false); document.addEventListener('jpush.openNotification', (event: any) => { @@ -53,7 +53,8 @@ export class HomePage { } else { content = event.aps.alert; } - alert('Open notification: ' + content); + // alert('Open notification: ' + content); + alert('open notification: ' + JSON.stringify(event)); }, false); document.addEventListener('jpush.receiveLocalNotification', (event: any) => { diff --git a/src/ios/Plugins/AppDelegate+JPush.m b/src/ios/Plugins/AppDelegate+JPush.m index 301638e..b4943d9 100644 --- a/src/ios/Plugins/AppDelegate+JPush.m +++ b/src/ios/Plugins/AppDelegate+JPush.m @@ -137,19 +137,38 @@ NSDictionary *_launchOptions; } -(void)jpushNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification withCompletionHandler:(void (^)(NSInteger))completionHandler{ - NSMutableDictionary *userInfo = [NSMutableDictionary dictionaryWithDictionary:notification.request.content.userInfo]; - [JPushPlugin fireDocumentEvent:JPushDocumentEvent_ReceiveNotification jsString:[userInfo toJsonString]]; - completionHandler(UNNotificationPresentationOptionBadge|UNNotificationPresentationOptionSound|UNNotificationPresentationOptionAlert); + NSMutableDictionary *userInfo = @[].mutableCopy; + + if ([notification.request.trigger isKindOfClass:[UNPushNotificationTrigger class]]) { + userInfo = [NSMutableDictionary dictionaryWithDictionary:notification.request.content.userInfo]; + } else { + UNNotificationContent *content = notification.request.content; + userInfo = @{@"content": content.body, + @"badge": content.badge, + @"extras": content.userInfo + }; + } + + [JPushPlugin fireDocumentEvent:JPushDocumentEvent_ReceiveNotification jsString:[userInfo toJsonString]]; + completionHandler(UNNotificationPresentationOptionBadge|UNNotificationPresentationOptionSound|UNNotificationPresentationOptionAlert); } -(void)jpushNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void (^)())completionHandler{ - NSMutableDictionary *userInfo = [NSMutableDictionary dictionaryWithDictionary:response.notification.request.content.userInfo]; - @try { - [userInfo setValue:[response valueForKey:@"userText"] forKey:@"userText"]; - } @catch (NSException *exception) { } - [userInfo setValue:response.actionIdentifier forKey:@"actionIdentifier"]; - [JPushPlugin fireDocumentEvent:JPushDocumentEvent_OpenNotification jsString:[userInfo toJsonString]]; - completionHandler(); + UNNotification *notification = response.notification; + NSMutableDictionary *userInfo = nil; + + if ([notification.request.trigger isKindOfClass:[UNPushNotificationTrigger class]]) { + userInfo = [NSMutableDictionary dictionaryWithDictionary:notification.request.content.userInfo]; + } else { + UNNotificationContent *content = notification.request.content; + userInfo = [NSMutableDictionary dictionaryWithDictionary:@{@"content": content.body, + @"badge": content.badge, + @"extras": content.userInfo + }]; + } + userInfo[@"actionIdentifier"] = response.actionIdentifier; + [JPushPlugin fireDocumentEvent:JPushDocumentEvent_OpenNotification jsString:[userInfo toJsonString]]; + completionHandler(); } - (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification { From 4585a13d7b4c11ba8996e51ec40e3310b87f1348 Mon Sep 17 00:00:00 2001 From: huangminlinux <380108184@qq.com> Date: Wed, 13 Dec 2017 13:32:34 +0800 Subject: [PATCH 14/21] update localnotification event field --- src/ios/Plugins/AppDelegate+JPush.m | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/ios/Plugins/AppDelegate+JPush.m b/src/ios/Plugins/AppDelegate+JPush.m index b4943d9..7198d66 100644 --- a/src/ios/Plugins/AppDelegate+JPush.m +++ b/src/ios/Plugins/AppDelegate+JPush.m @@ -143,10 +143,11 @@ NSDictionary *_launchOptions; userInfo = [NSMutableDictionary dictionaryWithDictionary:notification.request.content.userInfo]; } else { UNNotificationContent *content = notification.request.content; - userInfo = @{@"content": content.body, - @"badge": content.badge, - @"extras": content.userInfo - }; + userInfo = [NSMutableDictionary dictionaryWithDictionary:@{@"content": content.body, + @"badge": content.badge, + @"extras": content.userInfo + }]; + userInfo[@"identifier"] = notification.request.identifier; } [JPushPlugin fireDocumentEvent:JPushDocumentEvent_ReceiveNotification jsString:[userInfo toJsonString]]; @@ -165,6 +166,7 @@ NSDictionary *_launchOptions; @"badge": content.badge, @"extras": content.userInfo }]; + userInfo[@"identifier"] = notification.request.identifier; } userInfo[@"actionIdentifier"] = response.actionIdentifier; [JPushPlugin fireDocumentEvent:JPushDocumentEvent_OpenNotification jsString:[userInfo toJsonString]]; From 53e358893708057e304b97c8d32ab0e827fc938b Mon Sep 17 00:00:00 2001 From: huangminlinux <380108184@qq.com> Date: Thu, 14 Dec 2017 11:03:33 +0800 Subject: [PATCH 15/21] fix conflict --- src/ios/Plugins/AppDelegate+JPush.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ios/Plugins/AppDelegate+JPush.m b/src/ios/Plugins/AppDelegate+JPush.m index 7198d66..cb68d82 100644 --- a/src/ios/Plugins/AppDelegate+JPush.m +++ b/src/ios/Plugins/AppDelegate+JPush.m @@ -168,7 +168,7 @@ NSDictionary *_launchOptions; }]; userInfo[@"identifier"] = notification.request.identifier; } - userInfo[@"actionIdentifier"] = response.actionIdentifier; + [JPushPlugin fireDocumentEvent:JPushDocumentEvent_OpenNotification jsString:[userInfo toJsonString]]; completionHandler(); } From 4780eafb72c7898ca963df40e8fdca35d3760b9d Mon Sep 17 00:00:00 2001 From: huangminlinux <380108184@qq.com> Date: Thu, 14 Dec 2017 15:36:43 +0800 Subject: [PATCH 16/21] adjust ios remote notification formate --- src/ios/Plugins/AppDelegate+JPush.m | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/src/ios/Plugins/AppDelegate+JPush.m b/src/ios/Plugins/AppDelegate+JPush.m index cb68d82..fcc7026 100644 --- a/src/ios/Plugins/AppDelegate+JPush.m +++ b/src/ios/Plugins/AppDelegate+JPush.m @@ -44,7 +44,8 @@ NSDictionary *_launchOptions; if (notification.userInfo) { if ([notification.userInfo valueForKey:UIApplicationLaunchOptionsRemoteNotificationKey]) { - [JPushPlugin fireDocumentEvent:JPushDocumentEvent_OpenNotification jsString:[notification.userInfo toJsonString]]; + [JPushPlugin fireDocumentEvent:JPushDocumentEvent_OpenNotification + jsString:[[self jpushFormatAPNSDic: notification.userInfo[UIApplicationLaunchOptionsRemoteNotificationKey]] toJsonString]]; } if ([notification.userInfo valueForKey:UIApplicationLaunchOptionsLocalNotificationKey]) { @@ -82,6 +83,23 @@ NSDictionary *_launchOptions; [JPushPlugin fireDocumentEvent:JPushDocumentEvent_receiveRegistrationId jsString:[event toJsonString]]; } +- (NSMutableDictionary *)jpushFormatAPNSDic:(NSDictionary *)dic { + NSMutableDictionary *extras = @{}.mutableCopy; + for (NSString *key in dic) { + if([key isEqualToString:@"_j_business"] || + [key isEqualToString:@"_j_msgid"] || + [key isEqualToString:@"_j_uid"] || + [key isEqualToString:@"actionIdentifier"] || + [key isEqualToString:@"aps"]) { + continue; + } + extras[key] = dic[key]; + } + NSMutableDictionary *formatDic = dic.mutableCopy; + formatDic[@"extras"] = extras; + return formatDic; +} + -(void)registerForRemoteNotification{ if ([[UIDevice currentDevice].systemVersion floatValue] >= 10.0) { #ifdef NSFoundationVersionNumber_iOS_9_x_Max @@ -130,7 +148,8 @@ NSDictionary *_launchOptions; default: break; } - [JPushPlugin fireDocumentEvent:eventName jsString:[userInfo toJsonString]]; + + [JPushPlugin fireDocumentEvent:eventName jsString:[[self jpushFormatAPNSDic:userInfo] toJsonString]]; dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(30 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ completionHandler(UIBackgroundFetchResultNewData); }); @@ -140,7 +159,7 @@ NSDictionary *_launchOptions; NSMutableDictionary *userInfo = @[].mutableCopy; if ([notification.request.trigger isKindOfClass:[UNPushNotificationTrigger class]]) { - userInfo = [NSMutableDictionary dictionaryWithDictionary:notification.request.content.userInfo]; + userInfo = [self jpushFormatAPNSDic:notification.request.content.userInfo]; } else { UNNotificationContent *content = notification.request.content; userInfo = [NSMutableDictionary dictionaryWithDictionary:@{@"content": content.body, @@ -159,7 +178,7 @@ NSDictionary *_launchOptions; NSMutableDictionary *userInfo = nil; if ([notification.request.trigger isKindOfClass:[UNPushNotificationTrigger class]]) { - userInfo = [NSMutableDictionary dictionaryWithDictionary:notification.request.content.userInfo]; + userInfo = [self jpushFormatAPNSDic:notification.request.content.userInfo]; } else { UNNotificationContent *content = notification.request.content; userInfo = [NSMutableDictionary dictionaryWithDictionary:@{@"content": content.body, From b730924d74a29c652b0ccdb219e127c7a8b2550e Mon Sep 17 00:00:00 2001 From: Hevin Date: Thu, 14 Dec 2017 16:47:08 +0800 Subject: [PATCH 17/21] Fixed extras to object of addLocalNotificationForIOS --- ionic/index.ts | 2 +- ionic/jpush/index.d.ts | 2 +- ionic/jpush/index.js | 2 +- ionic/jpush/index.js.map | 2 +- ionic/jpush/jiguang-ionic-jpush-1.0.0.tgz | Bin 5193 -> 0 bytes ionic/jpush/package.json | 2 +- 6 files changed, 5 insertions(+), 5 deletions(-) delete mode 100644 ionic/jpush/jiguang-ionic-jpush-1.0.0.tgz diff --git a/ionic/index.ts b/ionic/index.ts index 5d875c6..6753d17 100644 --- a/ionic/index.ts +++ b/ionic/index.ts @@ -104,7 +104,7 @@ export class JPush extends IonicNativePlugin { getApplicationIconBadgeNumber(): Promise { return; } @Cordova() - addLocalNotificationForIOS(delayTime: number, content: string, badge: number, identifierKey: string, extras?: string): Promise { return; } + addLocalNotificationForIOS(delayTime: number, content: string, badge: number, identifierKey: string, extras?: object): Promise { return; } @Cordova() deleteLocalNotificationWithIdentifierKeyInIOS(identifierKey: string): Promise { return; } diff --git a/ionic/jpush/index.d.ts b/ionic/jpush/index.d.ts index 33aa538..0046106 100644 --- a/ionic/jpush/index.d.ts +++ b/ionic/jpush/index.d.ts @@ -44,7 +44,7 @@ export declare class JPush extends IonicNativePlugin { resetBadge(): Promise; setApplicationIconBadgeNumber(badge: number): Promise; getApplicationIconBadgeNumber(): Promise; - addLocalNotificationForIOS(delayTime: number, content: string, badge: number, identifierKey: string, extras?: string): Promise; + addLocalNotificationForIOS(delayTime: number, content: string, badge: number, identifierKey: string, extras?: object): Promise; deleteLocalNotificationWithIdentifierKeyInIOS(identifierKey: string): Promise; addDismissActions(actions: Array, categoryId: string): Promise; addNotificationActions(actions: Array, categoryId: string): Promise; diff --git a/ionic/jpush/index.js b/ionic/jpush/index.js index 6f8fede..52e5b2b 100644 --- a/ionic/jpush/index.js +++ b/ionic/jpush/index.js @@ -218,7 +218,7 @@ var JPush = (function (_super) { __decorate([ Cordova(), __metadata("design:type", Function), - __metadata("design:paramtypes", [Number, String, Number, String, String]), + __metadata("design:paramtypes", [Number, String, Number, String, Object]), __metadata("design:returntype", Promise) ], JPush.prototype, "addLocalNotificationForIOS", null); __decorate([ diff --git a/ionic/jpush/index.js.map b/ionic/jpush/index.js.map index 7d50956..c731ef5 100644 --- a/ionic/jpush/index.js.map +++ b/ionic/jpush/index.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../src/@ionic-native/plugins/jpush/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,MAAA,EAAQ,OAAA,EAAS,iBAAA,EAAkB,MAAO,oBAAA,CAAqB;AACxE,OAAO,EAAE,UAAA,EAAW,MAAO,eAAA,CAAgB;AAsB3C;IAA2B,yBAAiB;IAA5C;;IAyJA,CAAC;IAtJC,oBAAI,GAAJ,cAAuB,MAAM,CAAC,CAAC,CAAC;IAGhC,4BAAY,GAAZ,UAAa,MAAe,IAAkB,MAAM,CAAC,CAAC,CAAC;IAGvD,iCAAiB,GAAjB,cAAoC,MAAM,CAAC,CAAC,CAAC;IAG7C,wBAAQ,GAAR,cAA2B,MAAM,CAAC,CAAC,CAAC;IAGpC,0BAAU,GAAV,cAA6B,MAAM,CAAC,CAAC,CAAC;IAGtC,6BAAa,GAAb,c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;IAG5D;QADC,OAAO,EAAE;;;;gDACiD;IAG3D;QADC,OAAO,EAAE;;;;iDACoE;IAO9E;QADC,OAAO,EAAE;;;;mDACoC;IAG9C;QADC,OAAO,EAAE;;;;gEACiD;IAG3D;QADC,OAAO,EAAE;;;;iEACkD;IAG5D;QADC,OAAO,EAAE;;;;qDACsC;IAGhD;QADC,OAAO,EAAE;;;;sDACiD;IAG3D;QADC,OAAO,EAAE;;;;yDACqD;IAG/D;QADC,OAAO,EAAE;;;;qDACuJ;IAGjK;QADC,OAAO,EAAE;;;;wDAC+D;IAGzE;QADC,OAAO,EAAE;;;;yDACuD;IAGjE;QADC,OAAO,EAAE;;;;kDACmC;IAG7C;QADC,OAAO,EAAE;;;;+CAC0G;IAGpH;QADC,OAAO,EAAE;;yCACY,KAAK;;4CAAuE;IAhJvF,KAAK;QAVjB,MAAM,CAAC;YACN,UAAU,EAAE,OAAO;YACnB,MAAM,EAAE,uBAAuB;YAC/B,SAAS,EAAE,qBAAqB;YAChC,IAAI,EAAE,gDAAgD;YACtD,OAAO,EAAE,gFAAgF;YACzF,gBAAgB,EAAE,CAAC,SAAS,CAAC;YAC7B,SAAS,EAAE,CAAC,SAAS,EAAE,KAAK,CAAC;SAC9B,CAAC;OAEW,KAAK,CAyJjB;IAAD,YAAC;CAzJD,AAyJC,CAzJ0B,iBAAiB,GAyJ3C;SAzJY,KAAK","file":"index.js","sourceRoot":"","sourcesContent":["import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';\nimport { Injectable } from '@angular/core';\n\nexport interface TagOptions {\n sequence: number;\n tags?: Array;\n}\n\nexport interface AliasOptions {\n sequence: number;\n alias?: string;\n}\n\n@Plugin({\n pluginName: 'JPush',\n plugin: 'jpush-phonegap-plugin',\n pluginRef: 'plugins.jPushPlugin',\n repo: 'https://github.com/jpush/jpush-phonegap-plugin',\n install: 'ionic cordova plugin add jpush-phonegap-plugin --variable APP_KEY=your_app_key',\n installVariables: ['APP_KEY'],\n platforms: ['Android', 'iOS']\n})\n\nexport class JPush extends IonicNativePlugin {\n\n @Cordova()\n init(): Promise { return; }\n\n @Cordova()\n setDebugMode(enable: boolean): Promise { return; }\n\n @Cordova()\n getRegistrationID(): Promise { return; }\n\n @Cordova()\n stopPush(): Promise { return; }\n\n @Cordova()\n resumePush(): Promise { return; }\n\n @Cordova()\n isPushStopped(): Promise { return; }\n\n @Cordova()\n setTags(params: TagOptions): Promise { return; }\n\n @Cordova()\n addTags(params: TagOptions): Promise { return; }\n\n @Cordova()\n deleteTags(params: TagOptions): Promise { return; }\n\n @Cordova()\n cleanTags(params: TagOptions): Promise { return; }\n\n @Cordova()\n getAllTags(params: TagOptions): Promise { return; }\n\n /**\n * @param params { sequence: number, tag: string }\n */\n @Cordova()\n checkTagBindState(params: object): Promise { return; }\n\n @Cordova()\n setAlias(params: AliasOptions): Promise { return; }\n\n @Cordova()\n deleteAlias(params: AliasOptions): Promise { return; }\n\n @Cordova()\n getAlias(params: AliasOptions): Promise { return; }\n\n /**\n * Determinate whether the application notification has been opened.\n * \n * iOS: 0: closed; >1: opened.\n * UIRemoteNotificationTypeNone = 0,\n * UIRemoteNotificationTypeBadge = 1 << 0,\n * UIRemoteNotificationTypeSound = 1 << 1,\n * UIRemoteNotificationTypeAlert = 1 << 2,\n * UIRemoteNotificationTypeNewsstandContentAvailability = 1 << 3\n * \n * Android: 0: closed; 1: opened.\n */\n @Cordova()\n getUserNotificationSettings(): Promise { return; }\n\n @Cordova()\n clearLocalNotifications(): Promise { return; }\n\n // iOS API - start\n\n @Cordova()\n setBadge(badge: number): Promise { return; }\n\n @Cordova()\n resetBadge(): Promise { return; }\n\n @Cordova()\n setApplicationIconBadgeNumber(badge: number): Promise { return; }\n\n @Cordova()\n getApplicationIconBadgeNumber(): Promise { return; }\n\n @Cordova()\n addLocalNotificationForIOS(delayTime: number, content: string, badge: number, identifierKey: string, extras?: string): Promise { return; }\n\n @Cordova()\n deleteLocalNotificationWithIdentifierKeyInIOS(identifierKey: string): Promise { return; }\n\n @Cordova()\n addDismissActions(actions: Array, categoryId: string): Promise { return; }\n\n @Cordova()\n addNotificationActions(actions: Array, categoryId: string): Promise { return; }\n\n @Cordova()\n setLocation(latitude: number, longitude: number): Promise { return; }\n\n @Cordova()\n startLogPageView(pageName: string): Promise { return; }\n\n @Cordova()\n stopLogPageView(pageName: string): Promise { return; }\n\n @Cordova()\n beginLogPageView(pageName: string, duration: number): Promise { return; }\n\n // iOS API - end\n\n // Android API - start\n\n @Cordova()\n getConnectionState(): Promise { return; }\n\n @Cordova()\n setBasicPushNotificationBuilder(): Promise { return; }\n\n @Cordova()\n setCustomPushNotificationBuilder(): Promise { return; }\n\n @Cordova()\n clearAllNotification(): Promise { return; }\n\n @Cordova()\n clearNotificationById(id: number): Promise { return; }\n\n @Cordova()\n setLatestNotificationNum(num: number): Promise { return; }\n\n @Cordova()\n addLocalNotification(builderId: number, content: string, title: string, notificationId: number, broadcastTime: number, extras?: string): Promise { return; }\n\n @Cordova()\n removeLocalNotification(notificationId: number): Promise { return; }\n\n @Cordova()\n reportNotificationOpened(msgId: number): Promise { return; }\n\n @Cordova()\n requestPermission(): Promise { return; }\n\n @Cordova()\n setSilenceTime(startHour: number, startMinute: number, endHour: number, endMinute: number): Promise { return; }\n\n @Cordova()\n setPushTime(weekdays: Array, startHour: number, endHour: number): Promise { return; }\n\n // Android API - end\nstatic decorators: DecoratorInvocation[] = [\n{ type: Injectable },\n];\n/** @nocollapse */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n];\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]} \ No newline at end of file +{"version":3,"sources":["../../../src/@ionic-native/plugins/jpush/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,MAAA,EAAQ,OAAA,EAAS,iBAAA,EAAkB,MAAO,oBAAA,CAAqB;AACxE,OAAO,EAAE,UAAA,EAAW,MAAO,eAAA,CAAgB;AAs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ugin, Cordova, IonicNativePlugin } from '@ionic-native/core';\nimport { Injectable } from '@angular/core';\n\nexport interface TagOptions {\n sequence: number;\n tags?: Array;\n}\n\nexport interface AliasOptions {\n sequence: number;\n alias?: string;\n}\n\n@Plugin({\n pluginName: 'JPush',\n plugin: 'jpush-phonegap-plugin',\n pluginRef: 'plugins.jPushPlugin',\n repo: 'https://github.com/jpush/jpush-phonegap-plugin',\n install: 'ionic cordova plugin add jpush-phonegap-plugin --variable APP_KEY=your_app_key',\n installVariables: ['APP_KEY'],\n platforms: ['Android', 'iOS']\n})\n\nexport class JPush extends IonicNativePlugin {\n\n @Cordova()\n init(): Promise { return; }\n\n @Cordova()\n setDebugMode(enable: boolean): Promise { return; }\n\n @Cordova()\n getRegistrationID(): Promise { return; }\n\n @Cordova()\n stopPush(): Promise { return; }\n\n @Cordova()\n resumePush(): Promise { return; }\n\n @Cordova()\n isPushStopped(): Promise { return; }\n\n @Cordova()\n setTags(params: TagOptions): Promise { return; }\n\n @Cordova()\n addTags(params: TagOptions): Promise { return; }\n\n @Cordova()\n deleteTags(params: TagOptions): Promise { return; }\n\n @Cordova()\n cleanTags(params: TagOptions): Promise { return; }\n\n @Cordova()\n getAllTags(params: TagOptions): Promise { return; }\n\n /**\n * @param params { sequence: number, tag: string }\n */\n @Cordova()\n checkTagBindState(params: object): Promise { return; }\n\n @Cordova()\n setAlias(params: AliasOptions): Promise { return; }\n\n @Cordova()\n deleteAlias(params: AliasOptions): Promise { return; }\n\n @Cordova()\n getAlias(params: AliasOptions): Promise { return; }\n\n /**\n * Determinate whether the application notification has been opened.\n * \n * iOS: 0: closed; >1: opened.\n * UIRemoteNotificationTypeNone = 0,\n * UIRemoteNotificationTypeBadge = 1 << 0,\n * UIRemoteNotificationTypeSound = 1 << 1,\n * UIRemoteNotificationTypeAlert = 1 << 2,\n * UIRemoteNotificationTypeNewsstandContentAvailability = 1 << 3\n * \n * Android: 0: closed; 1: opened.\n */\n @Cordova()\n getUserNotificationSettings(): Promise { return; }\n\n @Cordova()\n clearLocalNotifications(): Promise { return; }\n\n // iOS API - start\n\n @Cordova()\n setBadge(badge: number): Promise { return; }\n\n @Cordova()\n resetBadge(): Promise { return; }\n\n @Cordova()\n setApplicationIconBadgeNumber(badge: number): Promise { return; }\n\n @Cordova()\n getApplicationIconBadgeNumber(): Promise { return; }\n\n @Cordova()\n addLocalNotificationForIOS(delayTime: number, content: string, badge: number, identifierKey: string, extras?: object): Promise { return; }\n\n @Cordova()\n deleteLocalNotificationWithIdentifierKeyInIOS(identifierKey: string): Promise { return; }\n\n @Cordova()\n addDismissActions(actions: Array, categoryId: string): Promise { return; }\n\n @Cordova()\n addNotificationActions(actions: Array, categoryId: string): Promise { return; }\n\n @Cordova()\n setLocation(latitude: number, longitude: number): Promise { return; }\n\n @Cordova()\n startLogPageView(pageName: string): Promise { return; }\n\n @Cordova()\n stopLogPageView(pageName: string): Promise { return; }\n\n @Cordova()\n beginLogPageView(pageName: string, duration: number): Promise { return; }\n\n // iOS API - end\n\n // Android API - start\n\n @Cordova()\n getConnectionState(): Promise { return; }\n\n @Cordova()\n setBasicPushNotificationBuilder(): Promise { return; }\n\n @Cordova()\n setCustomPushNotificationBuilder(): Promise { return; }\n\n @Cordova()\n clearAllNotification(): Promise { return; }\n\n @Cordova()\n clearNotificationById(id: number): Promise { return; }\n\n @Cordova()\n setLatestNotificationNum(num: number): Promise { return; }\n\n @Cordova()\n addLocalNotification(builderId: number, content: string, title: string, notificationId: number, broadcastTime: number, extras?: string): Promise { return; }\n\n @Cordova()\n removeLocalNotification(notificationId: number): Promise { return; }\n\n @Cordova()\n reportNotificationOpened(msgId: number): Promise { return; }\n\n @Cordova()\n requestPermission(): Promise { return; }\n\n @Cordova()\n setSilenceTime(startHour: number, startMinute: number, endHour: number, endMinute: number): Promise { return; }\n\n @Cordova()\n setPushTime(weekdays: Array, startHour: number, endHour: number): Promise { return; }\n\n // Android API - end\nstatic decorators: DecoratorInvocation[] = [\n{ type: Injectable },\n];\n/** @nocollapse */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n];\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]} \ No newline at end of file diff --git a/ionic/jpush/jiguang-ionic-jpush-1.0.0.tgz b/ionic/jpush/jiguang-ionic-jpush-1.0.0.tgz deleted file mode 100644 index fb6c166bda42f6122128b009e862e6e24a04e7d7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5193 zcmV-P6t?RhiwFP!000006YV`~QyaOm`#HZt*SG4#Bon_NFMG+x9zzy#5=aP}lS??% zU<)%~&p7iSaajNN+bwC{Z^tCFE>BT-EOocKC3Q<`$*rj}xK>8AKINaaD^u5gTk_Lr zG@fj2k+}2*%WII|nwza=tF`&G)olLOXf_`|eoB68ESr(I$2Kj+09JmK4wr?vpZ}2O z_8uV>O_|V2n^az2sUus_MvqioQwQ~{scl|XB!sx3h6#xX)T}jX4W2rr=D<*=mdM#Z z1bAZF)2VJ){Kq{LG0&F|fH`wP9VdzHTYGSc<`N%L`2=>Jx$we@5Z z^}p3n+(s4SCBH?J|Xv`%5%SSkA7o#s%BB+LK#r3zk(P62UGBW>YldfSXv)@h20HuG?fqovL*Bz^hnTMi+fIyNH z^U)g80jM)2@ZU5EH%|1M1?Itwk(L*sYN}P;Xp=*bTs7(MiZ*-E5rtcQdTx*2=tEki znsPn{KF)Q0OcgB_VMML>bff}X3JS5;PoQh*Q)DeZ*Py07p~?BGiFrprV@ijKj6>U) z)v01A6SM7Ws911iI4lA_q+@E)A{Ya#u_6dik=^mQ2uA(E1NKQCke3XFa75_l;XWi` zk90Z@SX_=)=bT>B!8H`s1LJsPDHe6h*Uzu$z)Gra)^%N2e@9NK!h%Sn!o~P1r4Qv9 z6BRU?lCPK4x}*kye?*y1VO(Y1m1w%9UN~Pa6_cD(su3MVS30Z-LJmFk;HXU+ZD?BE zq{9w*(QJnx2|3<-Pba!X-}>l&fWh)D40~joG^9+(o-!OE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pAq8azz%+-_vfy0C9qsTAX~=Vk7c>)=oR0wP-9p zmv}G|UmN4^ZNDJZTTTnOm3-y@k-)(GZ+1A8al#3l@Pe6mo}(!Snfse~Y0fcN?rk!d z2Mahj5tJ&Y^Iv_G>L2+8&;L1xf|q*@c*gxdo6V=;^M9L-r_J^Gzn}4(+*Z!c%-Q5z zhvi76?cC2T1&#$e-J;UIt$2PJ{1(7K2xANCOI z;0P@I>0DY;8wKuq_qvEXI#%X$Ji|(HfM$J<#b=Fl5m1av9r^po{YcD1kW1t<5MQ;d zOh&_`mX%XC+G$xC^aU*~D~rL{qh;mN2_9Nj{+#HaW#!KozO$?>dhs{Q%AqfSW?5N` zM!+m9r)~(#vNGt8L0MKFM`f?Xv{;a3=yZ(rKrR6akGOxUh24mipmCs19y0S7F6LYSt ztY(FdD>2{c5#Y+ocx)iIQZpNg#8y^r6GN$$mEqVJXJutJDM(p)`Avv2R$hj~!NSVQ zX(*~!iP?1HaFvtCIXvNgyXZD^bG^;H-ez8JGq1Oq*W1ixVQ{_8ygbDz_4eL+n|Zy> zTm}}`+ssQ=nR4^E-ez8JGq1Oqmt>9pc^kItZRVdk7Oc0Ked?(w?r@#8=)az&cte^Gsk9qzdY;5!n0KfnM D Date: Thu, 14 Dec 2017 17:16:00 +0800 Subject: [PATCH 18/21] Update example --- ionic/example/src/pages/home/home.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/ionic/example/src/pages/home/home.ts b/ionic/example/src/pages/home/home.ts index 22b1577..dba5e08 100644 --- a/ionic/example/src/pages/home/home.ts +++ b/ionic/example/src/pages/home/home.ts @@ -40,7 +40,7 @@ export class HomePage { var content; if (this.devicePlatform == 'Android') { content = event.alert; - } else { + } else { content = event.aps.alert; } alert('Receive notification: ' + JSON.stringify(event)); @@ -50,10 +50,13 @@ export class HomePage { var content; if (this.devicePlatform == 'Android') { content = event.alert; - } else { - content = event.aps.alert; + } else { // iOS + if (event.aps == undefined) { // 本地通知 + content = event.content; + } else { // APNS + content = event.aps.alert; + } } - // alert('Open notification: ' + content); alert('open notification: ' + JSON.stringify(event)); }, false); @@ -137,7 +140,7 @@ export class HomePage { if (this.devicePlatform == 'Android') { this.jpush.addLocalNotification(0, 'Hello JPush', 'JPush', 1, 5000); } else { - this.jpush.addLocalNotificationForIOS(5, 'Hello JPush', 1, 'noti1'); + this.jpush.addLocalNotificationForIOS(5, 'Hello JPush', 1, 'localNoti1'); } } } From cce897daa0f3f16614075e3a9f275b0c7610938c Mon Sep 17 00:00:00 2001 From: Hevin Date: Fri, 15 Dec 2017 14:50:38 +0800 Subject: [PATCH 19/21] Update install step of ionic --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/README.md b/README.md index 63cc890..19317cb 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,28 @@ cordova plugin add Your_Plugin_Path --variable APP_KEY=your_jpush_appkey ``` +### Ionic + +如果使用了 Ionic,可以再安装 @jiguang-ionic/jpush 包,适配 ionic-native: + +```shell +npm install @jiguang-ionic/jpush --save +``` + +然后在 *app.module.ts* 中增加 + +```js +import { JPush } from '@jiguang-ionic/jpush'; +... + providers: [ + ... + JPush, + ... + ] +``` + +具体可参考 ./ionic/example 中的文件。 + > 在使用 Xcode 8 调试 iOS 项目时,需要先在项目配置界面的 Capabilities 中打开 Push Notifications 开关。 ## Usage From d628cc168bcb187429dd758d6ea72f7309c6ea69 Mon Sep 17 00:00:00 2001 From: Hevin Date: Fri, 15 Dec 2017 15:01:09 +0800 Subject: [PATCH 20/21] Change the format --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 19317cb..ab78302 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ npm install @jiguang-ionic/jpush --save ``` -然后在 *app.module.ts* 中增加 +然后在 *app.module.ts* 中增加: ```js import { JPush } from '@jiguang-ionic/jpush'; From 5301a2c5eac00ef96c2646086be73d3c65e5efe2 Mon Sep 17 00:00:00 2001 From: Hevin Date: Fri, 15 Dec 2017 15:35:28 +0800 Subject: [PATCH 21/21] Update ionic install script --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ab78302..7f99134 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ 如果使用了 Ionic,可以再安装 @jiguang-ionic/jpush 包,适配 ionic-native: ```shell -npm install @jiguang-ionic/jpush --save +npm install --save @jiguang-ionic/jpush ``` 然后在 *app.module.ts* 中增加: @@ -51,7 +51,7 @@ import { JPush } from '@jiguang-ionic/jpush'; ] ``` -具体可参考 ./ionic/example 中的文件。 +具体可参考 ./ionic/example 中的文件。 > 在使用 Xcode 8 调试 iOS 项目时,需要先在项目配置界面的 Capabilities 中打开 Push Notifications 开关。