IPC is a general concept that means inter-process communication.
Let’s talk about IPC for Android
When it comes to Android, IPC means one of the following two situations:
- Communication between applications
- Communication of processes in a multi-process application (Application whose components such as Activity, Service, Receiver, Provider are run in different processes)
In this article, we will create examples of inter-application communication.
There are 3 basic methods used for IPC on Android:
It is also possible to use traditional Linux techniques (such as socket communication, shared files) to perform IPC. However, official documents recommend choosing one of the three methods specific to Android, which we mentioned above, in terms of security. Advantages such as authenticating the application that wants to communicate are possible in these three methods.
In this article series, we will look into the details of all 3 techniques and how to implement them.
Which technique should I use?
IPC 一般指代的是进程间的通信.
让我们一起来看看IPC在Android中的应用
在IPC在Android中通常有以下两种应用。
- 在应用程序之间通信
- 在多进程应用程序中的进程通信(应用程序,诸如Activity,Service,Receiver,Provider等组件在不同的进程中运行的应用程序)
在本文中,我们将创建应用程序间通信的示例。
在Android中有三种方法用于实现IPC:
- AIDL
- Messenger
- Broadcast
也可以使用传统的Linux技术(例如套接字通信,共享文件)来实现IPC。 但是,官方文件建议出于安全原因建议我们选择上面提到的三种方法之一。
在本文系列中,我们将研究所有3种技术的细节以及如何实现它们。
如何选择这三种技术?