jpush-react-native

JPush's officially supported React Native plugin (Android & iOS). 极光推送官方支持的 React Native 插件(Android & iOS)。

MIT License

Downloads
830
Stars
1.3K
Committers
37

Bot releases are hidden (Show)

jpush-react-native - v1.4.4 release

Published by huangminlinux over 7 years ago

Separate jpush-react-native into jcore-react-native and jpush-react-native.
After the later version,jpush-react-native and jcore-react-native need to be installed together.

jpush-react-native - v1.4.0 release

Published by huangminlinux over 7 years ago

delete package dependence.

dependence is not necessary,it will conflict with react-native module

jpush-react-native - v1.3.9 release

Published by huangminlinux over 7 years ago

jpush-react-native - v1.3.6 Release

Published by KenChoi1992 over 7 years ago

Change log

  • Android
    JS side can receive extras if there has extras in custom message.

Example:

JPushModule.addReceiveCustomMsgListener((map) => {
      this.setState({
        pushMsg: map.message
      });
      console.log("message: " + map.message);
      console.log("extras: " + map.extras);
    });
jpush-react-native - v1.3.5 Release

Published by KenChoi1992 almost 8 years ago

Change Log

Android

  • Use jpush-android-v3.0.1
  • Add API: addGetRegistrationIdListener() and removeGetRegistrationIdListener().

Server will return registrationId if device registered successfully(after initJPush).

Usage:

componentDidMount() {
    JPushModule.addGetRegistrationIdListener((registrationId) => {
        console.log("Device register succeed, registrationId " + registrationId);
    });
}

componentWillUnmount() {
    JPushModule.removeGetRegistrationIdListener("getRegistrationId");
}
jpush-react-native - v1.3.4 Release

Published by huangminlinux almost 8 years ago

Change log:
iOS:
update JPush SDK to 3.0.1

fix bug:
OpenNotification event is dispatched twice

jpush-react-native - v1.3.3 Release

Published by huangminlinux almost 8 years ago

Change log:

iOS:

  1. OpenNotification 事件将用于处理所有的点击推送事件。(iOS 10 )

在 Appdelegate.m 文件中 jpushNotificationCenter didReceiveNotificationResponse 方法需要做如下修改。

// iOS 10 Support
- (void)jpushNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void (^)())completionHandler {
  // Required
  NSDictionary * userInfo = response.notification.request.content.userInfo;
  if([response.notification.request.trigger isKindOfClass:[UNPushNotificationTrigger class]]) {
    [JPUSHService handleRemoteNotification:userInfo];
    [[NSNotificationCenter defaultCenter] postNotificationName:kJPFOpenNotification object:userInfo];
  }
  completionHandler();  // 系统要求执行这个方法
}
jpush-react-native - v1.3.2 Release

Published by KenChoi1992 almost 8 years ago

Change Log

  • Android

i. use jpush-android-v3.0.0.

ii. Open notification will judge if app is running on background, if running, then open app, else not. See more information if you want to open appointed Activity , please customise here. Reference this article for more detail.

jpush-react-native - JPush-react-native 1.2.9 发布

Published by huangminlinux almost 8 years ago

  1. 更新 jpush iOS sdk 到 3.0.0
  2. iOS 添加 打开推送的缓存,在reactjs 启动的时候才分发到 js 层。
    通过监听 OpenNotification 这个事件,通过如下代码,
NativeAppEventEmitter.addListener(
  'OpenNotification',
  (notification) => console.log(notification)
);
  1. iOS 添加 getRegistrationID 缓存在 JPush 成功登陆后,这个方法自动回调

4.修改 iOS 自动化配置脚本,添加接口推送的事件代码。
用户只需要关注 js 层的调用即可。

jpush-react-native - v1.2.3 Release

Published by KenChoi1992 almost 8 years ago

Android update

  • 不在 node_modules 做 APPKey 设置动作,而是移动到开发者项目中进行设置,参见 ReadMe;
  • 更新脚本(目前仍需手动更新 build.gradle 中关于 APPKey 的设置)
  • jpush 版本更新至 jpush-android-2.2.0
jpush-react-native - v1.1.8 版本更新

Published by huangminlinux almost 8 years ago

修复 系统更新后 demo 运行报错 bug

jpush-react-native - v1.1.6 版本更新

Published by huangminlinux about 8 years ago

支持 iOS10

jpush-react-native - v1.1.3 版本更新

Published by KenChoi1992 about 8 years ago

  • 提供自动化配置脚本
  • Android 点击通知事件修复 bug
jpush-react-native - v1.1.2 版本更新

Published by KenChoi1992 about 8 years ago

Android 改动

  • 使用 jpush-react-native-v0.1.1
  • 使用 jpush-android-2.1.7
  • 适配 React Ntive 0.30.0(详情参考
  • 接口改动:addReceiveNotificationListener 返回一个 Map,可以获得 extras 自定义附加字段(返回的是 json 字符串)
jpush-react-native - v1.1.1 修复bug

Published by KenChoi1992 over 8 years ago

  • 修复 Android 收到通知后点击通知无法打开应用的 bug
  • Android 方面增加两个接口: addReveiveOpenNotificationListener 以及 removeReceiveOpenNotificationListener
jpush-react-native - v1.1.0 提供 npm 安装包

Published by huangminlinux over 8 years ago

提供 npm 安装包:jpush-react-native,可通过 npm 命令直接安装与升级本插件。

jpush-react-native - v1.0.0 首次发布

Published by huangminlinux over 8 years ago

在 React Native 里直接使用原生的 JPush Android/iOS SDK。