安卓开发: Bluetooth Low Emission Advertisement is "Not Supported" on compatible devices

标签 android bluetooth bluetooth-lowenergy android-bluetooth beacon

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

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

为什么我的手机(一加 1)具有 SDK 23(支持蓝牙广告)并具有蓝牙芯片 -v 4.1 ,无法广告蓝牙数据。

这是我使用的谷歌存储库的链接。 https://github.com/googlesamples/android-BluetoothAdvertisements

最佳答案

请浏览引用链接

Chipsets/Devices supporting Android 5 BLE peripheral mode

希望对你有帮助

关于安卓开发: Bluetooth Low Emission Advertisement is "Not Supported" on compatible devices,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43906652/

相关文章:

android - Android和iOS之间通过蓝牙进行数据通信

android - 我想将我的 GridView 保存在一个 ImageView 中

java - 在Fragment切换中保留数据

android - 不将选定的项目值放入文本中......而是在 android 中采用微调器的默认值?

android - 如何以编程方式区分android中连接的蓝牙设备?

Android - 在连接蓝牙扬声器的内部电话扬声器上播放音频

安卓蓝牙 : onCharacteristicChanged never fires

android - Cordova 错误仅适用于 Android : com. android.dex.DexException:多个 dex 文件定义 Landroid/support/annotation/AnimRes;

java - 更改蓝牙查询扫描时间

android - RxAndroidBle 保持持久连接 + 写/通知处理