Android-Creating a Bound Service
2015-11-24 10:16
381 查看
When creating a service that provides binding, you must provide an
provides the programming interface that clients can use to interact with the service. There are three ways you can define the interface:Extending
the Binder class,Using a Messenger,Using
AIDL。When you need to perform IPC, using a
your interface is simpler than implementing it with AIDL, because
all calls to the service, whereas, a pure AIDL interface sends simultaneous requests to the service, which must then handle multi-threading.
IBinderthat
provides the programming interface that clients can use to interact with the service. There are three ways you can define the interface:Extending
the Binder class,Using a Messenger,Using
AIDL。When you need to perform IPC, using a
Messengerfor
your interface is simpler than implementing it with AIDL, because
Messengerqueues
all calls to the service, whereas, a pure AIDL interface sends simultaneous requests to the service, which must then handle multi-threading.
相关文章推荐
- 设置android studio打开时进入欢迎界面
- android dialog圆角显示及解决出现的黑色棱角
- Android教程 -08 ToolBar的使用和主题的介绍
- Android教程 -08 ToolBar的使用和主题的介绍
- Android PathMeasure使用
- Android Metrail Design
- shareSDK使用心得
- Android开发进阶系列(六) ListView的基本用法
- Android中Parcelable的使用
- Android基础之项目结构分析
- Android使用MPAndroidChart绘制图表
- Android SwipeRefreshLayout 官方下拉刷新控件介绍
- Android 百度地图 Binary XML file line
- Android运行时异常“Binary XML file line # : Error inflating class”
- Android RecyclerView
- Xamarin.Android之添加.so文件
- Android 内存泄漏调试
- 【Android】计算器
- Android.mk学习资料
- android progressbar