javascript - How to define chrome.bluetooth successfully? -
i looking minimal working example of bluetooth low energy object chrome such that:
chrome.bluetooth returns other
undefined from javascript @ runtime.
i've tried various incarnations of manifest.json including:
{ "name": "bluetooth low energy test app", "description": "app testing chrome.bluetoothlowenergy api", "version": "0.1", "app": { "background": { "scripts": ["background.js"] } }, "bluetooth": { "low_energy": true } } and
{ "name": "bluetooth low energy test app", "description": "app testing chrome.bluetoothlowenergy api", "version": "0.1", "app": { "background": { "scripts": ["background.js"] } }, "bluetooth": {} } and
{ "name": "bluetooth low energy test app", "description": "app testing chrome.bluetoothlowenergy api", "version": "0.1", "app": { "background": { "scripts": ["background.js"] } }, "bluetooth": { "profiles": [ "00001101-0000-1000-8000-00805f9b34fb" // array of uuids ] } } but none of these yield working chrome.bluetooth instance in javascript console.
i've tested on chrome 42 , 44 on mac os x , chromeos bluetooth enabled. both machines have bluetooth turned on , can see btle devices.
does chrome.bluetooth work on version of chrome on platform?
i never use api take @ developer.chrome.com/apps/manifest/bluetooth
also developer.chrome.com/apps/bluetoothlowenergy , developer.chrome.com/apps/bluetoothsocket both since chrome 37.
here (i think looking for) better example , explanation of how use (examples of devices, discover devices, etc) good stuff
anothers examples apps:
github.com/armansito/ble-battery-service-demo/blob/master/script.js github.com/googlechrome/chrome-app-samples/tree/master/samples/bluetooth-samples/device-info-demo
sorry plain text links, have not reputation paste more 2...
Comments
Post a Comment