如果APP已经启动,在新的task里重新启动APP,不影响原有的task,适用于SDK调用
PackageManager packageManager = mContext.getPackageManager(); Intent intent = packageManager.getLaunchIntentForPackage("com.xxxx"); intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED); mContext.startActivity(intent);