Bluetooth in Android 4.2 and 4.3(一):综述
来源:互联网 发布:淘宝助理无法同步店铺 编辑:程序博客网 时间:2024/06/11 15:45
网址:http://blog.csdn.net/yuanzhangmei1/article/details/25057587
从Android 4.2开始,Bluetooth stack发生了重大改变:从Bluez换成了由Google和Broadcom联合开发的Bluedroid(当然,核心的部分还是Broadcom的,Google主要是做了和上层Framework相关的部分)。通过http://source.android.com/devices/bluetooth.html可以大概了解新的Bluetooth stack的架构,总的来说相关文档很少,主要靠阅读代码进行深入了解。 Bluedroid和Bluez相比,有如下优点:
目前有一些Android 4.1或4.2的设备是支持BLE的,但是都是采用的Vendor自己的解决方案,比如Bluetooth stack采用Bluez 5.x,再提供Vendor BLE Android SDK. 现在Android 4.3已经发布,从未来发展趋势来看,如果有人要学习Bluetooth in Android,建议不要再研究Bluez,最好转向Bluedroid。
以下是Android 4.2中Bluetooth相关代码之分布:
android.bluetoothframeworks/base/core/java/android/bluetoothimplements public API for the Bluetooth adapter and profilesBluetooth system servicepackages/apps/Bluetooth/srcimplements service and profiles at the Android fraework layerBluetooth JNIpackages/apps/Bluetooth/jnidefines Bluetooth adapter and profiles service JNI: calls into HAL and receives callback from HALBluetooth HALhardware/libhardware/include/hardware/bt_*.h filesdefines the standard interface that the android.bluetooth adapter and profiles APIsBluetooth stackexternal/bluetooth/bluedroidimplement bluetooth stack: core and profiles
以Pan profile为例,我们可以看看代码的具体分布和类及文件的命名方式:
android.bluetoothframeworkspublic class BluetoothPan implements BluetoothProfileBluetooth System Servicepackages/appspublic class PanService extends ProfileServiceBluetooth JNIpackages/appscom_android_bluetooth_pan.cppBluetooth HALhardware/libhardwareinclude/hardware/bt_pan.hBluetooth stackexternal/bluetoothbluedroid/btif/src/btif_pan.c(implements bt_pan.h)bluedroid/bta/pan (Broadcom BTA)bluedroid/stack/pan (Broadcom BTE)
- 层次结构清晰。各个profile对上层接口统一,便于增加新的profile;增加了HAL层,便于移植。
- 去掉了DBus,Framework的Java代码直接调用到Bluedroid的Native代码。
目前有一些Android 4.1或4.2的设备是支持BLE的,但是都是采用的Vendor自己的解决方案,比如Bluetooth stack采用Bluez 5.x,再提供Vendor BLE Android SDK. 现在Android 4.3已经发布,从未来发展趋势来看,如果有人要学习Bluetooth in Android,建议不要再研究Bluez,最好转向Bluedroid。
以下是Android 4.2中Bluetooth相关代码之分布:
android.bluetoothframeworks/base/core/java/android/bluetoothimplements public API for the Bluetooth adapter and profilesBluetooth system servicepackages/apps/Bluetooth/srcimplements service and profiles at the Android fraework layerBluetooth JNIpackages/apps/Bluetooth/jnidefines Bluetooth adapter and profiles service JNI: calls into HAL and receives callback from HALBluetooth HALhardware/libhardware/include/hardware/bt_*.h filesdefines the standard interface that the android.bluetooth adapter and profiles APIsBluetooth stackexternal/bluetooth/bluedroidimplement bluetooth stack: core and profiles
以Pan profile为例,我们可以看看代码的具体分布和类及文件的命名方式:
android.bluetoothframeworkspublic class BluetoothPan implements BluetoothProfileBluetooth System Servicepackages/appspublic class PanService extends ProfileServiceBluetooth JNIpackages/appscom_android_bluetooth_pan.cppBluetooth HALhardware/libhardwareinclude/hardware/bt_pan.hBluetooth stackexternal/bluetoothbluedroid/btif/src/btif_pan.c(implements bt_pan.h)bluedroid/bta/pan (Broadcom BTA)bluedroid/stack/pan (Broadcom BTE)
0 0
- Bluetooth in Android 4.2 and 4.3(一):综述
- Bluetooth in Android 4.2 and 4.3(一):综述
- Bluetooth in Android 4.2 and 4.3(一):综述
- Bluetooth in Android 4.2 and 4.3(一):综述
- Bluetooth in Android 4.2 and 4.3(一):综述
- Bluetooth in Android 4.2 and 4.3(一):综述
- Bluetooth in Android 4.2 and 4.3 Enable Bluetooth
- Android Bluetooth Stack: Bluedroid(一):综述
- Bluetooth in Android 4.2 and 4.3:Scan remote devices
- Android 4.2 Bluetooth 分析总结(一)
- android 4.2-- 蓝牙 bluetooth (一) 入门
- Android bluetooth介绍(一)
- Android的联通性---Bluetooth(一)
- Android的联通性---Bluetooth(一)
- android -- 蓝牙 bluetooth (一) 入门
- android -- 蓝牙 bluetooth (一) 入门
- Android的联通性---Bluetooth(一)
- android -- 蓝牙 bluetooth (一) 入门
- 一个请求方法是一个线程吗?不是!
- 苹果提供的更新以及后台接口绕过审核的更新
- 欢迎使用CSDN-markdown编辑器
- Maven(二)-eclipse中集成maven
- .net 中 Json数据转实体类,实体类转Json
- Bluetooth in Android 4.2 and 4.3(一):综述
- weex mac下 搭建开发环境
- 【版本升级】MyEclipse 2017 CI 3发布(附下载)
- 关于XML文档的xmlns、xmlns:xsi和xsi:schemaLocation
- Android6.0 属性系统
- Android 写了两年项目对于公用控件有感
- hadoop学习笔记之flume nginx服务器安装
- c++ map、multimap 的使用方法
- 常用下载地址VS和QT