在同一个应用中,大家都熟悉用Intent在Activity之间跳转。那么Intent能否再两个应用之间跳转呢。答案是肯定的。

在Android2.0 后的做如下:
app1 org.freedom.app1.HelloActivity app2 org.freedom.app2.TestActivity 如何在app2的TestActivity调用app1的HelloActivity呢?
首先在app1的 AndroidManifest.xml中 HelloActivity声明中加入如下内容: <intent-filter>
<action android:name=""/>
</intent-filter>

然后就可以调用了 TestActivity 中调用代码如下: Intent Intent = new Intent(); intent.setClassName("org.freedom.app1", "org.freedom.app1.HelloActivity"); startActivity(intent);

更多相关文章

  1. android 启动自动调用自己创建的脚本(应用程序)
  2. android 休眠与唤醒II
  3. Android(安卓)Camera2 Hal3(二)startPreview预览过程
  4. android GoogleMap定位(一)
  5. 如何控制android中ImageView的位置
  6. 计算Android(安卓)App占用的各种空间大小
  7. No resource found that matches the given name (at 'xxx' with
  8. android基础知识06:intent和intentfilter
  9. Android(安卓)8.0以上 竖屏到横屏 返回时出现错误的解决办法

随机推荐

  1. 微服务还没彻底普及,宏服务又要来了?
  2. android 性能检测资料合集
  3. ktolin开发android的扩展包android-ktx
  4. 记一次三元表达式的坑(避免采坑)
  5. 单例模式的十种写法,你会几个?(重写版)
  6. Android之相机的使用
  7. 使用adb sideload 本地OTA升级Nexus 5(An
  8. Android之view虚线
  9. CopyOnWriteArrayList,一个面试中经常问
  10. 面试官:如何分库分表?