Android初学 IPC机制(Android IPC Mechanisms)【翻译】

原文链接:Android IPC Mechanisms

在这里插入图片描述

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种技术的细节以及如何实现它们。

如何选择这三种技术?

在这里插入图片描述

AIDL
Messenger
Broadcast

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值