我正在尝试编写连接到低功耗蓝牙设备的Chrome应用。我在清单中添加了"bluetooth": { "low_energy": true }
:
{
"name": "DE1",
"version": "1",
"manifest_version": 2,
"icons": {
"128": "de1icon.png"
},
"permissions": [],
"bluetooth": {
"uuids": ["A000"],
"low_energy": true
},
"app": {
"background": {
"scripts": ["chrome.js"]
}
}
}
但是当我打电话
chrome.bluetoothLowEnergy.connect
我得到了错误
Error handling response: TypeError: Cannot read property 'connect' of undefined
医生说这是我应该做的
https://developer.chrome.com/apps/manifest/bluetooth#reference
答案 0 :(得分:0)
我在Chrome项目中将其作为bug提交
https://bugs.chromium.org/p/chromium/issues/detail?id=980766
,他们已经回答。显然,只有ChromeOS才支持此功能,而我正在运行macOS。