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 🙏

© 2026 – Pkg Stats / Ryan Hefner

scm-expo-jpush

v1.0.10

Published

Linkmore Expo JPush

Readme

expo-jpush

Expo JPush module for Expo / React Native projects.

API documentation

Installation in managed Expo projects

For managed Expo projects, please follow the installation instructions in the API documentation for the latest stable release. If you follow the link and there is no documentation available then this library is not yet usable within managed projects — it is likely to be included in an upcoming Expo SDK release.

Installation in bare React Native projects

For bare React Native projects, you must ensure that you have installed and configured the expo package before continuing.

Add the package to your npm dependencies

npm install lm-expo-jpush

Configure for Android

Android 8.0+ requires a notification channel_id for notification display. This is different from the JPush install/statistics channel value.

Configure a default client channel in app.json:

[
  "lm-expo-jpush",
  {
    "appKey": "your-jpush-app-key",
    "channel": "dev",
    "android": {
      "notificationChannels": [
        {
          "id": "push_oplus_category_content",
          "name": "内容与营销",
          "importance": "high"
        }
      ],
      "vendorChannels": {
        "oppo": {
          "enabled": true,
          "appKey": "OP-your-oppo-app-key",
          "appId": "OP-your-oppo-app-id",
          "appSecret": "OP-your-oppo-app-secret"
        },
        "vivo": {
          "enabled": true,
          "appKey": "your-vivo-app-key",
          "appId": "your-vivo-app-id"
        },
        "xiaomi": {
          "enabled": true,
          "appKey": "your-xiaomi-app-key",
          "appId": "your-xiaomi-app-id"
        }
      }
    }
  }
]

notificationChannels[].id creates the Android notification channel used by notification.android.channel_id. It does not register the phone with OPPO's system push service by itself. For OPPO background/offline delivery, enable the OPPO vendor channel and provide the OPPO AppKey/AppID/AppSecret values with the OP- prefix required by OPPO/JPush. For vivo background/offline delivery, enable the vivo vendor channel and provide the vivo AppKey/AppID values. For Xiaomi background/offline delivery, enable the Xiaomi vendor channel and provide the Xiaomi AppKey/AppID values.

For local examples, you can keep secrets out of source by enabling OPPO/vivo/ Xiaomi in app.json and passing these environment variables before prebuild/run:

JPUSH_OPPO_APPKEY=OP-your-oppo-app-key
JPUSH_OPPO_APPID=OP-your-oppo-app-id
JPUSH_OPPO_APPSECRET=OP-your-oppo-app-secret
JPUSH_VIVO_APPKEY=your-vivo-app-key
JPUSH_VIVO_APPID=your-vivo-app-id
JPUSH_XIAOMI_APPKEY=your-xiaomi-app-key
JPUSH_XIAOMI_APPID=your-xiaomi-app-id

For example:

JPUSH_OPPO_APPKEY=OP-your-oppo-app-key \
JPUSH_OPPO_APPID=OP-your-oppo-app-id \
JPUSH_OPPO_APPSECRET=OP-your-oppo-app-secret \
JPUSH_VIVO_APPKEY=your-vivo-app-key \
JPUSH_VIVO_APPID=your-vivo-app-id \
JPUSH_XIAOMI_APPKEY=your-xiaomi-app-key \
JPUSH_XIAOMI_APPID=your-xiaomi-app-id \
npx expo run:android --device PJE110

When the OPPO, vivo, or Xiaomi vendor channel is enabled, the config plugin fails prebuild early if any required values are missing. This prevents building an APK whose manufacturer channel manifest values are empty.

With debug: true, a successful OPPO vendor registration should include logs similar to OPushCallback ... registerID and ThirdPushManager uploadRegID with platform=4. If the push strategy is "only manufacturer channel, discard on failure" and no push record is produced, the device usually has no valid manufacturer channel target yet.

When pushing Android notification messages, send the same value as notification.android.channel_id. For OPPO devices, JPush's manufacturer classification also needs the OPPO fields under options.third_party_channel.oppo, for example:

{
  "notification": {
    "android": {
      "alert": "hello",
      "title": "JPush",
      "channel_id": "push_oplus_category_content"
    }
  },
  "options": {
    "classification": 1,
    "third_party_channel": {
      "oppo": {
        "channel_id": "push_oplus_category_content",
        "category": "IM",
        "notify_level": 16
      }
    }
  }
}

When using the JPush web console, set the same channel in both places:

  • Android config notification template: 渠道 ID = push_oplus_category_content
  • OPPO vendor settings: channel_id = push_oplus_category_content, category = IM, notify_level = 16

If the Android notification template still shows 渠道 ID:--, the Android notification itself is missing channel_id, even when the OPPO vendor settings are filled.

Custom messages are pass-through messages and are not displayed in the system notification tray by the JPush SDK.

Configure for iOS

Run npx pod-install after installing the npm package.

Publish to npm

This repository is configured to publish to the public npm registry:

npm install
npm run build
npm run build:plugin
npm pack --dry-run

After verifying the package contents, bump the version and publish:

npm version patch
npm publish

Contributing

Contributions are very welcome! Please refer to guidelines described in the contributing guide.

prebuild

cd example & npx expo prebuild --platform android

真机调试 exmaple

npx expo run:android --device PJE110