当前位置: 动力学知识库 > 问答 > 编程问答 >

android - catch getLaunchIntentForPackage event

问题描述:

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.

分享给朋友:
您可能感兴趣的文章:
随机阅读: