实验性的Web 蓝牙 API在Android Marshmallow的开发版Chrome 中运行良好。我可以简单地启用实验标志,chrome://flags/#enable-web-bluetooth
我很高兴。
遗憾的是,Web 蓝牙 API 在我的 Android Lollipop 设备上不起作用。为什么?
实验性的Web 蓝牙 API在Android Marshmallow的开发版Chrome 中运行良好。我可以简单地启用实验标志,chrome://flags/#enable-web-bluetooth
我很高兴。
遗憾的是,Web 蓝牙 API 在我的 Android Lollipop 设备上不起作用。为什么?
首先,感谢您的提问。你肯定不是唯一一个……
如https://github.com/WebBluetoothCG/web-bluetooth/blob/gh-pages/implementation-status.md#notes中所述,
为了方便开发人员,Chromium 构建可在 Android Lollipop 或更高版本上运行 - 但 Chrome 版本将仅支持 Marshmallow 或更高版本。
因此,以下是如何在 Chrome for Android Lollipop 上使用 Web 蓝牙:
chrome-android.zip
,在您的文件夹中提取下载的文件~/Downloads
adb install -r ~/Downloads/chrome-android/apks/ChromePublic.apk
通过输入你的 shell来安装 Chromiumchrome://flags/#enable-web-bluetooth
和/或请求原始试用令牌处启用实验标志,以便您的网站可以在没有任何标志的情况下使用 Web 蓝牙 API。笔记:
警告!适用于 Android 的 Chromium 版本不会像 Google Chrome 那样自动更新。如果您想要新版本的 Chromium 来测试新功能,则必须重新下载并在您的 Android 设备上重新安装它。