基础篇(十四) 进程间通信
来源:互联网 发布:影视大全为什么没网络 编辑:程序博客网 时间:2024/05/22 02:16
在android中提供了四种跨进程通讯的方式。对应于android四大组件:Activity、Content Provider、BroadcastReciever和Service。
一、Activity被其他进程调用。
在AndroidManifest.xml文件中注册Activity时,设置action作为ID,用来被调用。
Intent callIntent = new Intent(Intent.ACTION_CALL, Uri.parse("tel:12345678"); startActivity(callIntent);
二、ContentProvider被其他进程访问,对其数据进行增、删、改、查的操 作。
在AndroidManifest.xml文件中注册ContentProvider时,设置authorities作为ID,用来被调用。
三、BroadcastReciever的监听其他进程发送的Broadcast,对其进行处理;
在AndroidManifest.xml文件中注册BroadcastReciever时,设置action作为ID,用来被调用。
四、Service被其他进程访问,需要用到AIDL(Android Interface Definition Language)。
在AndroidManifest.xml文件中注册Service时,设置action作为ID,用来被绑定。 绑定后利用binder来和Service通信。
参考(http://blog.csdn.net/toyuexinshangwan/article/details/8640709)
0 0
- 基础篇(十四) 进程间通信
- 进程间通信基础
- 操作系统(十四)------进程间通信的几种方式
- Linux 进程间通信 基础
- 进程间管道通信基础
- Linux进程间通信(一)基础篇
- 四大组建进程间通信--基础
- 简图记录-linux进程间通信基础
- 基础进程通信
- Python基础-多进程-线程池Pool-进程间通信
- 进程&进程间通信
- 进程间通信--管道篇
- 第三篇:进程间通信
- linux网络编程之进程间通信基础(一):进程间通信概述
- linux网络编程之进程间通信基础(一):进程间通信概述
- 进程间通信之共享内存-系统调用mmap详解(基础篇)
- 进程间通信之共享内存-SystemV shmxxx详解(基础篇)
- linux应用程序设计基础--进程间通信(IPC)
- 160. Intersection of Two Linked Lists
- Android窗口显示:全屏与隐藏标题栏
- android 选择头像上传
- 串口通信
- HDU 4763 Theme Section(KMP)
- 基础篇(十四) 进程间通信
- 36. Valid Sudoku
- WebRTC in the real world: STUN, TURN and signaling
- JavaScript下拉列表的二级联动
- 88. Merge Sorted Array
- 【暴力】HDU4858项目管理
- android学习之路(三)高级组件之图片切换器<ImageSwicther/>以及final关键字的基本用法
- 通过百度BAE搭建微信二次开发的服务(2)
- android window类