一直对于处于不同的application的activity的调用,心存疑虑。
昨天,使用intent的隐式调用进行了实现。
首先,建立一个android 工程,就比如HelloWorld程序,只需要在该activity下加入属性:
<intent-filter>
<action android:name="com.able.test.aaa"></action>
<category android:name="android.intent.category.DEFAULT"></category>
</intent-filter>
,再建立一个android工程,我们就称之为Test,只需要在里面使用:
Intent intentA = new Intent("com.able.test.aaa");
intentA.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK
| Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED);
startActivity(intentA);
就可以成功调用HelloWorld程序的那个加入了intent-filter的activity。

更多相关文章

  1. cocos2dx程序 在android上 触碰屏幕就崩溃 crash in cocos on to
  2. Android stdio调试程序闪退或者报错:"xxx keeps stopping"解决方
  3. ANDROID应用程序的混淆打包
  4. android 锁屏时,不运行锁屏程序
  5. [摘]Android如何将程序打成jar包
  6. android里在程序中修改listView里的内容
  7. Android 开机自启动示例程序
  8. 如何使用arm-eabi-gdb调试android c/c++程序

随机推荐

  1. Android(安卓)Bitmap和Canvas
  2. android opengl 实现相机的实时滤镜
  3. Android04之CheckBox和ImageView
  4. android 支持的资源类型及其存放的目录
  5. android浮动布局
  6. 笔记:TextView属性大全
  7. android 自定义注解处理器
  8. android loading界面 及 处理
  9. 增加Android模拟器空间(Internal Storage
  10. Github上100个经典开源Java项目 值得阅读