Android一个应用跳转另外一个应用
来源:互联网 发布:future java 编辑:程序博客网 时间:2024/05/29 06:30
APP1:
Intent tIntent = new Intent();
ComponentName tComp = new ComponentName("com.example.newporject"(另外一个应用包名), "com.example.newporject.NextActivity"(另外一个应用包名+窗口名));
tIntent.setComponent(tComp);
// tIntent.setAction("android.intent.action.MAIN");
tIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(tIntent);
<activity
android:name="com.example.next.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="com.example.next.MainActivity" />
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
记得要加权限:
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
APP2:
<activity
android:name=".NextActivity"
android:label="@string/title_activity_next" >
<intent-filter>
<action android:name="com.example.newporject.NextActivity" />
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
0 0
- Android一个应用跳转另外一个应用
- Android 从一个应用跳转到另外一个应用
- Android 一个应用启动另外一个应用
- Android 一个应用启动另外一个应用
- Android 从一个应用跳转到另外一个应用中的问题
- android在一个应用中启中另外一个应用
- 10.Android在一个应用中启动另外一个应用
- Android中 一个应用启动另外一个应用一
- 在Android中启动另外一个应用
- Android 安装和启动另外一个应用
- Android 安装和启动另外一个应用
- Android 打开另外一个应用的activity
- Android 安装和启动另外一个应用
- Activity跳转到另外一个应用的Activity
- Android中从service中向另外一个应用包跳转的问题
- 从一个应用进入另外一个应用
- android应用如何启动另外一个apk应用
- android应用如何启动另外一个apk应用
- 【java简单的注解使用方式】用注解代替设置属性方法
- 流媒体的一些基本概念
- AVPlayerLayer播放网络音视频
- mysql 学习笔记
- 绘制图片时使用双缓冲机制,避免闪烁
- Android一个应用跳转另外一个应用
- 如何查看、添加、修改、删除电脑内部路由
- 性能分析-内存分析leakcanary
- 一款下拉刷新以及上拉加载的控件库,扩展性强,使用简单。并附带有可以添加 header 和 footer 的 Recyclerview
- C++函数调用方式
- PullToRefreshListView的使用
- 简单记录一下,cenos 7搭建ftp服务器
- 转--listener、filter、servlet、interceptor区别
- JAVA四种方式访问XML(DOM,SAX,JDOM,DOM4J)