Coder Social home page Coder Social logo

ionic2-jpush-demo's Introduction

ionic2-jpush-demo

基于IONIC2极光推送示例

DEMO运行步骤

npm install ionic serve ionic platfom add android ionic run android

集成步骤 详情

通过 Cordova Plugins 安装,要求 Cordova CLI 5.0+:

cordova plugin add jpush-phonegap-plugin --variable API_KEY=your_jpush_appkey 或者直接通过 url 安装:

cordova plugin add https://github.com/jpush/jpush-phonegap-plugin.git --variable API_KEY=your_jpush_appkey 或下载到本地安装:

cordova plugin add Your_Plugin_Path --variable API_KEY=your_jpush_appkey

实现方式

ionic-native的基础上新增了JPUSH的调用方法

目前只实现了公共API部分 详情公共 API

调用方式

import { JPush } from 'ionic-native';

JPush.init().then(res => { alert(res) });

JPush.stopPush().then(res => { alert(res) });

JPush.isPushStopped().then(res => { alert(res) });

JPush.getRegistrationID().then(res => { alert(res) });

JPush.resumePush().then(res => { alert(res) });

JPush.setAlias(alias).then(res => { alert(res) });

JPush.setTags(tags).then(res => { alert(res) });

JPush.setTagsWithAlias(tags,alias).then(res => { alert(res) });

JPush.getUserNotificationSettings().then(res => { alert(res) });

查看更多>>

欢迎大家加入Ionic2.0 交流群 513752928

ionic2-jpush-demo's People

Contributors

zjcboy avatar

Watchers

James Cloos avatar hok avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.