Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ionic3-jpush

npm

基于ionic3 和 ionic-native3 的极光推送封装

更新说明

官方phonegap插件jpush-phonegap-plugin更新了Api。 ionic3-jpush 1.2.0 需要jpush-phonegap-plugin >= 3.2.4。

若你的项目适用jpush-phonegap-plugin < 3.24 请使用 ionic3-jpush 1.1.0 npm i ionic3-jpush@1.1 --save

以下Api参数发生变化

Alias API

  • setAlias
  • deleteAlias
  • getAlias

Tag API

  • setTags
  • addTags
  • deleteTags
  • cleanTags
  • getAllTags
  • checkTagBindState

如何使用

  1. 安装官方Cordova插件
ionic plugin add jpush-phonegap-plugin --variable APP_KEY=your_jpush_appkey
  1. 安装模块ionic3-jpush
npm i ionic3-jpush -S
  1. app.module.ts中引入,并加入到@NgModuleproviders
import { JPush } from 'ionic3-jpush';

@NgModule({
  ...
  providers: [ JPush ],
})
export class AppModule { }

  1. 在Component中调用方法
//...
import { JPush } from 'ionic3-jpush';

@Component({
    template: `
        <ion-nav [root]="rootPage"></ion-nav>`
})
export class MyApp {

  constructor (public jPush: JPush){

    this.jPush.getRegistrationID().then(regid => {
      console.log(regid)
    })

  }
}

Api说明

About

基于ionic3 和 ionic-native3 的极光推送封装

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Morty Proxy This is a proxified and sanitized view of the page, visit original site.