The BluetoothDevice.watchAdvertisements() method will enable web apps to receive events when the system receives an advertisement packet from a watched device.
This API will allow web apps to detect whether a device is unresponsive because it has gone out of range by listening for advertisement packets from the device. Without this API, operations on the Bluetooth device would hang until the device was timed out on the system, causing a 'gattserverdisconnected' event to be fired. With persistent permissions for Web Bluetooth, watchAdvertisements() will enable web apps to check if a permitted device is in range of the system before attempting to connect to the device.
Specification being incubated in a Community Group
Status in Chromium
In developer trial (Behind a flag)
Consensus & Standardization
Intent to Prototype urlIntent to Prototype thread
Search tagsWeb Bluetooth, watchAdvertisements, BluetoothDevice,
Last updated on 2021-04-23