问题描述:

I have got two applications. I want to create an action where the first app opens the second already launched app.

I found that the code

Intent intent = context.getPackageManager().getLaunchIntentForPackage(packageName);

intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);

intent.putExtra(SENDER, somedata);

context.startActivity(intent);

can bring to front already lauched activity.

But how can the application catch when it was called with intent data?

onNewIntent is not fired. It fires only before onCreate event.

相关阅读:
Top