android:process
The name of the process in which the activity should run. Normally, all components of an application run in the default process created for the application. It has the same name as the application package. The <application> element's process attribute can set a different default for all components. But each component can override the default, allowing you to spread your application across multiple processes.

If the name assigned to this attribute begins with a colon (':'), a new process, private to the application, is created when it's needed and the activity runs in that process. If the process name begins with a lowercase character, the activity will run in a global process of that name, provided that it has permission to do so. This allows components in different applications to share a process, reducing resource usage.


1.默认情况下,应用程序各个组件都是工作在一个进程里的,android:process="com.test.helloworld" (即包名)

组件可以覆盖这个值哦~

2.android:process=":remote",在这个组件启动时,会工作在一个新的进程里

3.android:process="remote" ,已小写字母开头,工作在全局进程里,提供permission,允许其他的应用程序访问它哦~


related demo:包括 notification/pendingintent/intentservice等,可以通过log来学习。

http://download.csdn.net/detail/null1989/6477727



PS:关于异步任务

AysnTask :适用于生命周期较短且需要UI上显示进度和结果的后台操作,但是当activity重新启动后,这种操作不能持续进行。

Service:适用于生命周期较长的后台操作,如从internet下载数据。

Cursor Loader:查询数据库啦 contentProvider

IntentService Alarm :适用于按需或是固定间隔执行的一组任务,轮询啥的

更多相关文章

  1. 理清 Jetpack 这些知识点后,我面试顺利入职了腾讯
  2. Android在Service服务中调用Activity活动的方法,实现UI界面更新操
  3. 史上最优美的Android原生UI框架XUI使用指南
  4. Android中多进程的应用
  5. Android卡顿相关原理和排查工具
  6. Android冷启动与热启动概念
  7. Android报表解决方案 使用开源组件iChartjs(二)
  8. 解析后台进程对Android性能影响的详解
  9. android 进程与线程 相关

随机推荐

  1. Android(安卓)内置浏览器之webview
  2. Android系统修改汇总(MTK)
  3. Android(安卓)productFalvors 多渠道打包
  4. Android在layout xml中使用include .
  5. Android后台数据接口类型
  6. Android(安卓)RecyclerView更新某条/一条
  7. Android4.4.2配置修改记录
  8. Android(安卓)Intent学习
  9. Android(安卓)代码混淆及遇到的问题
  10. [置顶] 我的博客索引