npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@youyiying/jpush-phonegap-plugin-vendor-channel

v1.1.3

Published

极光推送厂商通道集成Cordova插件

Downloads

6

Readme

jpush-phonegap-plugin-vendor-channel

极光推送厂商通道(华为、小米、魅族、oppo、vivo)集成 Cordova 插件

使用步骤及说明

1.获取华为推送配置文件 agconnect-services.json

img_2.png 如上图所示,在华为开放平台配置好推送相关信息后即可下载此文件,下载后将此文件放在 cordova 项目根目录。 需要特别注意的是,华为开放平台配置的是 SHA256 证书指纹,若配置为了 SHA1 证书指纹,厂商通道启用将会失败。

2.添加项目推送配置文件 push_config.json

push_config.json 为除华为外其他厂商(小米等)的推送配置信息,在 cordova 项目根目录新建push_config.json,文件内容如下,并将对应值修改正确

//push_config.json文件内容
{
  "applicationId": "your_android_package_id",
  "JPUSH_APPKEY": "your_jpush_appkey",
  "JPUSH_CHANNEL": "developer-default",
  "MEIZU_APPKEY": "MZ-魅族的APPKEY",
  "MEIZU_APPID": "MZ-魅族的APPID",
  "XIAOMI_APPID": "MI-小米的APPID",
  "XIAOMI_APPKEY": "MI-小米的APPKEY",
  "OPPO_APPKEY": "OP-oppo的APPKEY",
  "OPPO_APPID": "OP-oppo的APPID",
  "OPPO_APPSECRET": "OP-oppo的APPSECRET",
  "VIVO_APPKEY": "vivo的APPKEY",
  "VIVO_APPID": "vivo的APPID",
  "HONOR_APPID": "Honor的APPID"
}

3.安装插件

确保前两步已完成后在执行插件安装! 前两步完成后项目结构如下图所示: img_1.png 安装命令:

cordova plugin add @youyiying/jpush-phonegap-plugin-vendor-channel --variable APP_KEY=your_jpush_app_key

4.打包测试

dev 打包和 release 打包时所用的证书都应该为在厂商开放平台配置过得指纹,若打包证书不一致,厂商通道也会启用失败。

厂商通道启用失败常见原因

1.未配置打包证书

如上图所示,未在 app 模块的 build.grade 中配置打包所用证书

2.华为平台证书指纹配置错误

华为平台证书指纹与其他厂商平台均不一样,需要配置 SHA256 证书指纹

3.push_config.json 中错误修改

在修改 push_config.json 为自身配置时,请不要删除前缀!如小米 key,配置值应为 MI-key