的AIDL的使用示例 [英] Example of AIDL use

查看:164
本文介绍了的AIDL的使用示例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

明白 AIDL 在Android中,我想要一个现实生活中的例子,是指在我们需要使用 AIDL

通过阅读Android的文档......这使我处于混乱等诸多问题,因此难以辨认整个DOC对我来说,任何人都可以帮助我

  1. 是它与外界的电话沟通。

  2. 或用不同的应用程序进行通信,(为什么我们需要与其他应用程序进行通信)

  3. 什么样的​​服务,他们所谈论的文档的

解决方案

AIDL用于粘合剂。粘合剂是一种机制,做到RPC调用上/从Android的服务。

在使用AIDL?当你需要的服务。当你需要一个服务?如果你想分享的数据,并在另一个应用程序控制的东西,你需要使用AIDL作为接口的服务。 (共享数据时,内容提供商只用)。

服务可以在你的应用程序中的MVC-模式中的模型辊内使用。

to understand the AIDL in android, i want one real life example, means the at what scenario of development we need to use AIDL.

by reading the Android Docs ... It puts me in confusion and so many question, so it is hard to read whole doc for me, can anyone help me

  1. is it for communicating with outside the phone.

  2. or to communicating with different apps, (why we need to communicate with other apps)

  3. what kind of service they are talking in docs

解决方案

AIDL is used for Binder. Binder is a mechanism to do RPC calls on/from an Android Service.

When to use AIDL? When you need a Service. When do you need a Service? If you want to share data and control something in another application, you need a service using AIDL as an interface. (A Content Provider is used when sharing data only).

Services can be used within your application as the model roll in the MVC-pattern.

这篇关于的AIDL的使用示例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆