Android进程间通信(一)概述及一些基本概念

参考:https://developer.android.com/guide/components/processes-and-threads

原文:

Interprocess communication

Android offers a mechanism for interprocess communication (IPC) using remote procedure calls (RPCs), in which a method is called by an activity or other application component, but executed remotely (in another process), with any result returned back to the caller. This entails decomposing a method call and its data to a level the operating system can understand, transmitting it from the local process and address space to the remote process and address space, then reassembling and reenacting the call there. Return values are then transmitted in the opposite direction. Android provides all the code to perform these IPC transactions, so you can focus on defining and implementing the RPC programming interface.

To perform IPC, your application must bind to a service, using bindService(). For more information, see the Servicesdeveloper guide.

-------------------------------------------------------------

要点

一.IPC(interprocess communication)

即进程间通信

二:RPCs(remote procedure calls)

远端程序调用s

三:机制

This entails decomposing a method call and its data to a level the operating system can understand, transmitting it from the local process and address space to the remote process and address space, then reassembling and reenacting the call there. Return values are then transmitted in the opposite direction.

简单说来就是:把这些方法,数据等拆给操作系统,传给远端程序,然后远端再重新组装。

返回值也要经历相同的过程。

Android provides all the code to perform these IPC transactions, so you can focus on defining and implementing the RPC programming interface.

安卓帮你搞定了IPC所需要的一切,你只要专心实现RPC programming interface 就好

四:怎么做:

To perform IPC, your application must bind to a service, using bindService(). For more information, see the Servicesdeveloper guide.

要实现IPC,需要绑定到service,具体怎么做,下一篇再写。

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值