gpt4 book ai didi

Android绑定(bind)服务和AIDL服务

转载 作者:行者123 更新时间:2023-12-02 21:12:17 24 4
gpt4 key购买 nike

我读到了bound serviceAIDL based service Android 开发者指南

两者似乎都允许其他组件绑定(bind)并执行进程间通信

Bound service allows components (such as activities) to bind to the service, send requests, receive responses, and even perform interprocess communication (IPC).

AIDL (Android Interface Definition Language) is similar to other IDLs you might have worked with. It allows you to define the programming interface that both the client and service agree upon in order to communicate with each other using interprocess communication (IPC).

那么有什么区别呢?

最佳答案

AIDL 只是与绑定(bind)服务通信的一种方式。不存在“基于 AIDL 的服务”这样的东西,它只是一个绑定(bind)服务,返回一个基于 AIDL 接口(interface)生成的 Binder。

关于Android绑定(bind)服务和AIDL服务,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12719612/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com