jpush-react-native icon indicating copy to clipboard operation
jpush-react-native copied to clipboard

无法关闭推送

Open zerotalk opened this issue 8 years ago • 4 comments

你的运行环境

  • 插件版本: "jpush-react-native": "2.1.3","jcore-react-native": "1.2.2",
  • react-native 版本:0.49.3

期望效果

能够自行关闭推送

实际效果

可以开启推送,但无法关闭推送,运行下面代码后还是能收到通知

//相关代码 if (Platform.OS == 'android'){ JPushModule.stopPush(); } else if(Platform.OS == 'ios') { JPushModule.removenetworkDidLoginListener(()=>{}) JPushModule.removeReceiveNotificationListener((map)=>{}) JPushModule.removeReceiveOpenNotificationListener((map)=>{}) JPushModule.removeOpenNotificationLaunchAppEventListener((map)=>{}) JPushModule.removeConnectionChangeListener((result)=>{}) DeviceEventEmitter.removeAllListeners(); NativeAppEventEmitter.removeAllListeners(); }

重现步骤

  1. ...
  2. ...
  3. ...
  4. ...

Debug logs

包括 Android 或 iOS 的日志:

zerotalk avatar Jan 19 '18 06:01 zerotalk

android 还是 iOS?

huangminlinux avatar Jan 22 '18 03:01 huangminlinux

@huangminlinux 两个都无法关闭

zerotalk avatar Jan 23 '18 08:01 zerotalk

@zerotalk 我用 example 测试可以关闭,stopPush 后收不到通知。

KenChoi1992 avatar Jan 26 '18 06:01 KenChoi1992

没吊用

WhereareUmylove avatar Dec 27 '24 09:12 WhereareUmylove