Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cordova-plugin-android-jpush

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cordova-plugin-android-jpush

JPush for cordova plugin

  • 3.6.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

安卓手机极光推送

极光推送

安装 cordova-plugin-android-jpush

 cordova plugin add cordova-plugin-android-jpush --variable APP_KEY=your_app_key

使用

使用前需注册,以获取 token ,你可以将 token 与你的app用户信息关联后上传到服务器

// 注册推送
jPush.register(function(token) {
    console.log(token); // 不一定能接收到token
}, function(err) {
    console.log(err);
}, []);
// 接收token
jPush.onNewToken(function(token) {
    console.log(token); // 会多次接收到token
});

注册完成后,需要监听 messageReceived 事件

document.addEventListener("messageReceived", function(result) {
    console.log(result);
}, false);

Keywords

FAQs

Package last updated on 26 Oct 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc