0

我正在尝试编写一个连接到蓝牙低功耗设备的 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

4

1 回答 1

0

我在铬项目中将此作为错误提交

https://bugs.chromium.org/p/chromium/issues/detail?id=980766

他们已经回答了。显然,此功能仅在 ChromeOS 上受支持,而我正在运行 macOS。

于 2019-07-03T07:01:40.150 回答