我要尋找一個藍牙低能量對象的最小工作例如鉻這樣的:在運行其他如何成功定義chrome.bluetooth?
chrome.bluetooth
回報的東西比
undefined
從JavaScript。
我試過的manifest.json的各種各樣的化身,包括:
{
"name": "Bluetooth Low Energy Test App",
"description": "App testing the chrome.bluetoothLowEnergy API",
"version": "0.1",
"app": {
"background": {
"scripts": ["background.js"]
}
},
"bluetooth": {
"low_energy": true
}
}
和
{
"name": "Bluetooth Low Energy Test App",
"description": "App testing the chrome.bluetoothLowEnergy API",
"version": "0.1",
"app": {
"background": {
"scripts": ["background.js"]
}
},
"bluetooth": {}
}
和
{
"name": "Bluetooth Low Energy Test App",
"description": "App testing the chrome.bluetoothLowEnergy API",
"version": "0.1",
"app": {
"background": {
"scripts": ["background.js"]
}
},
"bluetooth": {
"profiles": [
"00001101-0000-1000-8000-00805f9b34fb" // array of uuids
]
}
}
但這些都不產生工作chrome.bluetooth實例在JavaScript控制檯中。
我已經在Mac OS X和ChromeOS上啓用藍牙的Chrome 42和44上測試了此功能。兩臺機器都已開啓藍牙並可以看到BTLE設備。
在任何平臺上,chrome.bluetooth是否適用於任何版本的Chrome?