Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

同时打开两个插件的MainActivity,只有一个显示出来? #398

Open
AndroidSXK opened this issue Sep 13, 2017 · 0 comments
Open

Comments

@AndroidSXK
Copy link

AndroidSXK commented Sep 13, 2017

我在宿主中用for 循环同时打开两个插件的MainActivity,最终只有前面一个打开了。我打开的代码如下:
PackageManager pm = MainActivity.this.getPackageManager();
Intent intent = pm.getLaunchIntentForPackage("包名");
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
if (intent != null) {
Log.i(TAG, "打开应用:" );
MainActivity.this.startActivity(intent);
} else {
Log.i(TAG, "应用没有入口activity!");
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant