jpush-react-native
jpush-react-native copied to clipboard
作者您好,点击通知栏的推送消息,当前app重新打开,这是什么原因
是因为在 JPushModule 235行 onReceive 方法,收到点击通知栏的事件后,如果 mModule.mContext 为 null, 执行了:
String packageName = context.getApplicationContext().getPackageName();
Intent launchIntent = context.getPackageManager().getLaunchIntentForPackage(packageName);
launchIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED);
launchIntent.putExtras(bundle);
context.startActivity(launchIntent);
所以才会重新打开 App
已解决,非常感谢!