一直对于处于不同的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. Unity与Android接口互相调用
  2. android 资源res下目录使用
  3. Listview 选项按下去黑了所有按钮的解决方法 ——android:cacheC
  4. Android(安卓)support library 23.2新特性介绍
  5. 【Android(安卓)+ Java】简便的异步Http连接框架
  6. GreenDao 在 Android(安卓)Studio 中的配置使用
  7. 箭头函数的基础使用
  8. NPM 和webpack 的基础使用
  9. Python list sort方法的具体使用

随机推荐

  1. AndFire防火墙1.2版本发布
  2. android获取设备唯一标识device_token
  3. Android Dialog 去除背景内容模糊
  4. 自定义Android(cacerts.bks)添加根证书
  5. 解决Cocos2d-x3.1编译生成Android程序出
  6. Android(安卓)ANR原因分析(基于traces.tx
  7. Android DEX Preopt prebuilt apks
  8. Android:获取屏幕分辨率方法汇总
  9. android之TextVIew与Button交互
  10. Android App怎样调用 Frameworks Bluetoo