Intent to Prototype: Web Bluetooth BluetoothDevice.watchAdvertisements()
92 views
Skip to first unread message
Ovidio Ruiz-Henríquez
unread,
Apr 29, 2020, 7:13:32 PM4/29/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to blink-dev
odej...@chromium.org
Specification: https://webbluetoothcg.github.io/web-bluetooth/https://docs.google.com/document/d/1h3uAVXJARHrNWaNACUPiQhLt7XI-fFFQoARSs1WgMDM/edit#heading=h.jdnga4sjs82y
Web Bluetooth API: https://github.com/w3ctag/design-reviews/issues/139
Web Bluetooth Scanning API: https://github.com/w3ctag/design-reviews/issues/333
The Web Bluetooth API TAG review discusses how Web Bluetooth mitigates privacy risks through a user prompt. watchAdvertisements() can only be used on a BluetoothDevice object, which is only available after being granted device access through the prompt.
The Bluetooth Scanning API mentions a privacy issue around knowing the devices around the user. watchAdvertisements() only notifies the web app if an advertisement is received for the BluetoothDevice that it was called on.
The BluetoothDevice.watchAdvertisements() API will enable web apps to receive events when the system receives an advertisement packet from the device for which advertisements are being watched for.
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.