参考:https://developer.android.com/guide/components/processes-and-threads
原文:
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,具体怎么做,下一篇再写。