為什麼我的手機不支援 BLE
来源:互联网 发布:arm linux gnu gcc 编辑:程序博客网 时间:2024/05/22 13:45
1. This line returns failed:
mContext.getPackageManager().hasSystemFeature(
PackageManager.FEATURE_BLUETOOTH_LE)
Your device must have the file in file system to support BLUETOOTH,
/etc/handheld_core_hardware.xml
<feature name="android.hardware.bluetooth" />
and have this file to support BLE
/etc/android.hardware.bluetooth_le.xml
<feature name="android.hardware.bluetooth_le" />
Unfortunately, my ASUS Zenfone 5 doesn't have the file android.hardware.bluetooth_le.xml, so the feature is missing.
2. Even I ignore FEATURE_BLUETOOTH_LE, I still don't get BLE functions.
We get BluetoothManager from SystemService.
BluetoothManager bluetoothManager =
(BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE);
In BluetoothAdapter.java
IBluetoothGatt iGatt = mManagerService.getBluetoothGatt();
we got iGatt == null, which means the BluetoothManager doesn't contain IBluetoothGatt.
In BluetoothManagerService.java
private void bluetoothStateChangeHandler(int prevState, int newState) {
......
if (mContext.getPackageManager().hasSystemFeature(
PackageManager.FEATURE_BLUETOOTH_LE)) {
Intent i = new Intent(IBluetoothGatt.class.getName());
doBind(i, mConnection, Context.BIND_AUTO_CREATE, UserHandle.CURRENT);
}
It doesn't bind to the GattService, so it cannot use Ble functions.
3. Can we use normal BT API to connect BLE device?
- 為什麼我的手機不支援 BLE
- 我到哪里可以获得Linux的技术支援
- 支援
- Spring 對 Lob 的支援...
- Spring 對 Lob 的支援...
- 支援(让人很感动的一篇武侠)
- 努力工作,为了支援灾区的人们!
- OpenNI 2 對 Kinect 的支援
- IOS--苹果各地区开发者支援的电话号码
- [BLE] CC2541 BLE Peripheral工程的建立
- BLE的Advertising包
- BLE 链路层的状态机
- BLE的未来
- Ble蓝牙的使用手册
- BLE的一些基本概念
- BLE的隐私保护
- 部署开源SOA需要专业人才与技术的支援
- javascirpt對ie與firefox的支援性
- 用友优普总裁:移动互联带来两个层面的变化
- 程序员一定要了解哪十大算法
- ADF 选择当前树节点
- 面向对象编程的弊端是什么?
- Linux内核编译
- 為什麼我的手機不支援 BLE
- 从jsp 接收另外一个jsp的参数并且把这个参数赋值给js 文件;
- php 二维数组排序比较 1 —— 冒泡排序法
- 关于android应用程序的入口
- 领悟-ajax
- Leveldb 实现原理
- 并查集(Union -Find)应用举例--基础篇
- vim配置
- 用友支持服务 从幕后走向前台