Android BluetoothProfile之A2dp
来源:互联网 发布:python 3.6中文教程 编辑:程序博客网 时间:2024/04/30 11:13
BluetoothA2dp(Advanced AudioDistribution Profile ):
(一).BluetoothA2dp的生成。
(以下根据android4.0原生代码分析):
基本关系:
在SystemServer中将BluetoothA2dpService的 new出来,并将其如到ServiceManager中。之后调用bluetooth.initAfterA2dpRegistration();----àmEventLoop.getProfileProxy();------à
mAdapter.getProfileProxy(mContext,mProfileServiceListener, BluetoothProfile.A2DP);
mAdapter.getProfileProxy(mContext,mProfileServiceListener,BluetoothProfile.INPUT_DEVICE);(这里顺便也将InputDevice的代理得到,但是InputDevice的服务在哪里加的呢?)
BluetoothAdapter:getProfileProxy
可以看到这个方法中会得到一些代理的客户端,在原生代码中包含了下的:
BluetoothHeadset,BluetoothA2dp,BluetoothInputDevice,BluetoothPan,BluetoothHealth。
BluetoothA2dp a2dp = newBluetoothA2dp(context, listener); (listener是从BluetoothEventLoop传进来的,主要是用于监听客户端与服务端建立连接和断开连接,如果断开连接会将BluetoothEventLoop中的mA2dp置为null。)-------à
BluetoothA2dp:
在构造函数里面会得到加入到ServiceManager中的BluetoothA2dpService服务。后面的很多操作应该就是通过BluetoothA2dp找到BluetoothA2dpService操作。
- Android BluetoothProfile之A2dp
- Android BluetoothProfile之HID
- Android BluetoothProfile之Headset
- Android BluetoothProfile之AVRCP
- Android BluetoothProfile之AVRCP
- android-BluetoothProfile
- Android BluetoothProfile之OPP(蓝牙文件分享流程)
- android-BluetoothProfile.ServiceListener
- Android蓝牙4.0API内容-接口-BluetoothProfile
- Android蓝牙A2dp开发
- A2DP
- A2DP
- A2DP
- A2DP
- a2dp
- a2dp
- a2dp
- a2dp
- 2012年11月3日记
- Project Euler problem 12
- c++实现“统计输入的string中重复次数最多的string”
- SpringMVC 表单数据绑定
- 哪些手机用windows系统
- Android BluetoothProfile之A2dp
- C#接口详细解释和用法(通俗易懂)
- 阅读一款3D引擎的方法备忘
- AForge学习笔记(9):AForge.Imaging.ComplexFilters
- 关于acm的种种
- poj 1860
- Android的图片压缩类ThumbnailUtils,供源码研究 .
- Oracle_服务器客户端乱码问题.
- 函数对象