Android的广播接收机VS AIDL接收机、Android、AIDL、VS

由网友(℡此男洧點⒉)分享简介:什么是使用AIDL VS广播接收机,为应用程序之间发送消息(后台和前台处理)的利弊?我一直在使用接收器,这是很好由于订阅模式意图过滤器和易用性/可扩展性。是否有缺点,使用这种方法来VS AIDL?What are the pros and cons of using aidl vs broadcast receive...

什么是使用AIDL VS广播接收机,为应用程序之间发送消息(后台和前台处理)的利弊?我一直在使用接收器,这是很好由于订阅模式意图过滤器和易用性/可扩展性。是否有缺点,使用这种方法来VS AIDL?

What are the pros and cons of using aidl vs broadcast receivers for sending messages between apps (for both background and foreground handling)? I've been using receivers which is nice due to the subscription model with intent filters, and the ease of use / extensibility. Are there drawbacks to using this approach to vs AIDL?

THX本

推荐答案

我认为一个人拉回可能是电池寿命具有接收器收听不断投入紧张的电池电量。 BroadCastReceivers可以有安全漏洞,如果你也上广播时,除非你的本地广播,那么你可以使用,当然LocalBroadcastManager不重视的权限。

I think one draw back might be the battery life as having a receiver listening constantly puts strain on battery level. BroadCastReceivers can have security holes if you dont emphasis permissions when broadcasting also unless your broadcasting locally then you can use LocalBroadcastManager of course.

AIDL我似乎更安全,但更难抽象为一组中的一般使用。我喜欢AIDL文件时,我有,我想在另一个进程中,使许多不同的API调用。它就像一个遥控器。用Broadcastreciever可能较难直接调用自定义方法做的工作。

AIDL to me seems more secure but harder to abstract for general use in a group. I like AIDL files when i have many different API calls i want to make in another process. Its like a remote control. with a Broadcastreciever might be harder to directly call custom methods to do work.

阅读全文

相关推荐

最新文章