您的位置:首页 > 移动开发

android app to app

2015-12-18 15:43 369 查看
app1:

</pre><pre name="code" class="java">Intent intent = new Intent();
intent.addCategory(Intent.CATEGORY_LAUNCHER);
ComponentName cn = new ComponentName("APP2包名", “APP2类名”);
intent.setComponent(cn);
intent.putExtra("CallBack", "infor");
startActivityForResult(intent, REQUEST_CODE);

app2:
AndroidManifest.xml文件中

该activity下添加属性

android:exported="true"

<intent-filter>
<action
android:name=""
/>
<category
android:name="android.intent.category.LAUNCHER"
/>
</intent-filter>

app1可以调APP2的任意activity
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: