How to use the jpush-react-native.clearAllNotifications 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-android / push_activity.js View on Github external
componentWillUnmount() {
		JPushModule.removeReceiveCustomMsgListener(receiveCustomMsgEvent);
		JPushModule.removeReceiveNotificationListener(receiveNotificationEvent);
		JPushModule.removeReceiveOpenNotificationListener(openNotificationEvent);
		JPushModule.removeGetRegistrationIdListener(getRegistrationIdEvent);
		console.log("Will clear all notifications");
		JPushModule.clearAllNotifications();
	}
github mrarronz / react-native-blog-examples / Chapter13-PushNotification / PushNotification / App.js View on Github external
componentWillUnmount() {
    console.log("Will clear all notifications");
    JPushModule.clearAllNotifications();
  }
github duheng / Mozi / src / AppNavigationState.js View on Github external
componentWillUnmount() {
    !!this.onBackPress && BackHandler.removeEventListener('hardwareBackPress', this.onBackPress);
    this.lastBackPressed = null;

    JPushModule.removeReceiveCustomMsgListener();
    JPushModule.removeReceiveNotificationListener();
    JPushModule.removeReceiveOpenNotificationListener();
    JPushModule.clearAllNotifications();
  }