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
</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
相关文章推荐
- iOS让你的app一直在后台活着(运行)
- Android 播放mp3
- Android ViewPager + Fragment 替换 TabActivity
- app inventor分析
- android bitmap和base64之间的转换
- iOS 方法objc_msgSend()编译不通过
- Aandroid在ViewPager中添加ListView
- iOS中对copy与mutableCopy的理解
- Android onMeasure and onLayout
- Android使用Fragment来实现TabHost的功能(解决切换Fragment状态不保存)以及各个Fragment之间的通信
- android bitmap compress(图片压缩)
- 移动webapp页面适配方案
- iOS中写一个完整的单例
- Android ContentProvider和Uri详解 (绝对全面)
- Android笔记(4) ---ListView绑定SimpleAdapter适配器并下拉刷新数据
- Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xm
- MetaHandler.js:移动端适配各种屏幕
- android开发方向
- Android中Parcelable接口用法
- android手机连接android wear (手表模拟器)的连接