How to use the jpush-react-native.setupPush function in jpush-react-native

To help you get started, we’ve selected a few jpush-react-native examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jpush / jpush-react-native / example / react-native-iOS / push_activity.js View on Github external
componentWillMount() {

        JPushModule.setupPush()  // if you add register notification in Appdelegate.m 有 don't need call this function
        JPushModule.getBadge((badge) => {Alert.alert("badge", badge)})
        JPushModule.addnetworkDidLoginListener(() => {
          console.log('连接已登录')
          JPushModule.addTags(['dasffas'], (result)=> {
            Alert.alert('addTags success:' + JSON.stringify(result))
          })
        })

        JPushModule.addOpenNotificationLaunchAppListener((result) => {
          Alert.alert('addOpenNotificationLaunchAppListener', 'the notification is :' + JSON.stringify(result))
        })

        JPushModule.addReceiveOpenNotificationListener((result) => {
          Alert.alert('addReceiveOpenNotificationListener',JSON.stringify(result))
        })
github syun0216 / goforeat / goforeat_app / app / components / HomePageHOC.js View on Github external
_jpushDidMount() {
    if(Platform.OS == 'android') {
      this._jpush_android_setup()
    }else {
      JPushModule.setupPush()
    }    
    this._jpushCommonEvent();
  }
github syun0216 / goforeat / app / hoc / CommonHOC.js View on Github external
_jpushDidMount() {
      if (Platform.OS == "android") {
        this._jpush_android_setup();
      } else {
        JPushModule.setupPush();
      }
      this._jpushCommonEvent();
    }