Android 开发:Bluetooth Low Emission Advertisement 在兼容设备上 "Not Supported"

Android Developement: Bluetooth Low Emission Advertisement is "Not Supported" on compatible devices

我正在开发一个 android 应用程序,这需要我使用我的应用程序所在的设备发送蓝牙低发射广告 运行。 我在博客 post 中读到这个“您需要在 build.gradle 文件中将最低 SDK 版本设置为 21,因为在 Lollipop 发布之前 Android 上并未引入蓝牙 LE 广告。 ”。博客是“https://code.tutsplus.com/tutorials/how-to-advertise-android-as-a-bluetooth-le-peripheral--cms-25426.

但是,当我去查看蓝牙广告的Google 存储库时,最低SDK 是25。我现在很困惑。 BLE 的基本要求是您需要一个支持 4.X 版本的蓝牙设备。几乎所有具有 SDK 21 的设备都有。

为什么我的手机(一加1)有SDK 23(支持蓝牙广播)和蓝牙芯片-v 4.1,为什么不能广播蓝牙数据。

这是我使用的 google 存储库的 link。 https://github.com/googlesamples/android-BluetoothAdvertisements

请参考link

Chipsets/Devices supporting Android 5 BLE peripheral mode

希望对您有所帮助