Web Bluetooth getDevices()
Chrome's implementation of Web Bluetooth does not have a way for websites to get a list of permitted devices. This feature adds the Bluetooth.getDevices() method. getDevices() will return a list of BluetoothDevice objects that the current origin has been granted permission to use by the user.
Not being able to query for a list of permitted devices without having to display a permission prompt has been a pain point of using the Web Bluetooth API. Instead, a site has to call navigator.bluetooth.requestDevice() and have the user choose a device from the device chooser prompt on every visit to the page. This is also annoying for users who have to deal with a permission prompt on every visit to the site. This is even more frustrating if the user has multiple Bluetooth devices to connect because the prompt can only grant permission to one device at a time.
Status in Chromium
Behind a flag (tracking bug) in:
- Chrome for desktop release 84
- Chrome for Android release 84
Consensus & Standardization
Last updated on 2020-03-31