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
In developer trial (Behind a flag) (tracking bug) in:
- Chrome for desktop release 85
- Chrome for Android release 85
Consensus & Standardization
Intent to Prototype urlIntent to Prototype thread
Search tagsWeb Bluetooth, getDevices,
Last updated on 2020-10-25