android - BluetoothLeAdvertiser 是否适用于装有 Android 5.0 的 Nexus 5?

标签 android bluetooth-lowenergy ibeacon ibeacon-android

在将我的 Nexus 5 刷入 Android 5.0 预览版hammerhead-lpx13d 后,操作系统报告它不再支持蓝牙 LE 广告。如果你打电话:

((BluetoothManager) this.getSystemService(Context.BLUETOOTH_SERVICE))
    .getAdapter().getBluetoothLeAdvertiser()

总是返回空值。另外,新方法:

((BluetoothManager) this.getSystemService(Context.BLUETOOTH_SERVICE))
    .getAdapter().isMultipleAdvertisementSupported()

总是返回 false

在 6 月份的 Nexus 5 的第一个 Android L 预览版中,第一个用于返回有效对象的方法。刷新最新更新后,它不再这样做了。

有没有人不这样认为?

编辑:这已被至少一个人转载,他在此处向 Google 提出了问题:https://code.google.com/p/android-developer-preview/issues/detail?id=1570

最佳答案

很遗憾,Google 的官方回答是不,Nexus 5 不再支持广告。

We introduced BLE peripheral mode in Android 5.0 Lollipop. Nexus 6 and Nexus 9 are the first two production Nexus devices that support BLE peripheral mode. Due to hardware chipset dependency, older Nexus devices (4/5/7) will not have access to the feature on Lollipop.

请参阅 danielho 在问题 1570 上的评论 #52...@google.com:BLE 广告模式不起作用 https://code.google.com/p/android-developer-preview/issues/detail?id=1570

也就是说,我已经确认 Nexus 9 平板电脑支持广告。详情见这里:http://developer.radiusnetworks.com/2014/11/18/beacon-transmission-with-android-5.html

关于android - BluetoothLeAdvertiser 是否适用于装有 Android 5.0 的 Nexus 5?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26441785/

相关文章:

ios - Estimote Beacon 加速度计更新时间

android - 当 EditText 为空白且没有数据时,它的值是什么?

android - 在圆圈中显示带有首字母的联系人姓名

iOS 应用程序无法检测到它位于 CLBeaconRegion 内

android - 低功耗蓝牙 (BLE) - 如何分别获取服务、特征和描述符的 UUID

ios - NativeScript - 使用 iBeacon 重启应用程序,AppDelegate 必须实现窗口属性

ios - 估计信标无法按预期在 iPhone 上工作

android - 使用 EXTRA_PLUGGED 获取 USB 电缆插入 IN/OUT 事件不起作用

android - Gradle插件3.6.1,分发URL版本5.6.4中的Gradle构建错误

android - 如何在我的 Android 应用程序中从 Mi Band 3 获取连续的心率数据