| OLD | NEW |
| 1 <h1>Bluetooth</h1> | 1 <h1>Bluetooth</h1> |
| 2 | 2 |
| 3 <p> | 3 <p> |
| 4 This document describes how to use the <a href="bluetooth.html">Bluetooth | 4 This document describes how to use the <a href="bluetooth">Bluetooth |
| 5 API</a> to communicate with Bluetooth and Bluetooth Low Energy devices. | 5 API</a> to communicate with Bluetooth and Bluetooth Low Energy devices. |
| 6 </p> | 6 </p> |
| 7 | 7 |
| 8 <p> | 8 <p> |
| 9 For background information about Bluetooth, see the official | 9 For background information about Bluetooth, see the official |
| 10 <a href="http://www.bluetooth.org">Bluetooth specifications</a>. | 10 <a href="http://www.bluetooth.org">Bluetooth specifications</a>. |
| 11 </p> | 11 </p> |
| 12 | 12 |
| 13 <h2 id="manifest">Manifest requirements</h2> | 13 <h2 id="manifest">Manifest requirements</h2> |
| 14 | 14 |
| 15 <p> | 15 <p> |
| 16 For Chrome Apps that use Bluetooth, add the | 16 For Chrome Apps that use Bluetooth, add the |
| 17 <a href="manifest/bluetooth.html">bluetooth</a> entry to the manifest | 17 <a href="manifest/bluetooth">bluetooth</a> entry to the manifest |
| 18 and specify, if appropriate, the UUIDs of profiles, protocols or services | 18 and specify, if appropriate, the UUIDs of profiles, protocols or services |
| 19 you wish to implement. | 19 you wish to implement. |
| 20 For example: | 20 For example: |
| 21 </p> | 21 </p> |
| 22 | 22 |
| 23 <pre data-filename="manifest.json"> | 23 <pre data-filename="manifest.json"> |
| 24 "bluetooth": { | 24 "bluetooth": { |
| 25 "uuids": [ "1105", "1106" ] | 25 "uuids": [ "1105", "1106" ] |
| 26 } | 26 } |
| 27 </pre> | 27 </pre> |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 <pre> | 276 <pre> |
| 277 chrome.bluetooth.getDevices(function(devices) { | 277 chrome.bluetooth.getDevices(function(devices) { |
| 278 for (var i = 0; i < devices.length; i++) { | 278 for (var i = 0; i < devices.length; i++) { |
| 279 if (devices[0].vendorIdSource != undefined) { | 279 if (devices[0].vendorIdSource != undefined) { |
| 280 console.log(devices[0].address + ' = ' + devices[0].type); | 280 console.log(devices[0].address + ' = ' + devices[0].type); |
| 281 } | 281 } |
| 282 } | 282 } |
| 283 }); | 283 }); |
| 284 </pre> | 284 </pre> |
| 285 | 285 |
| OLD | NEW |