Hello Friends!
Contact emails
dougt@, ortuno@, reillyg@
Explainer
Link to explainer.
Design doc/Spec
Design doc.
Summary
Web Bluetooth Scanning is a proposed web API to enable a site to listen for BLE advertising packets. Our plan is to start implementing this web feature.
For example, to listen for data from an iBeacon:
navigator.bluetooth.requestLEScan().then(() => {
navigator.bluetooth.addEventListener('advertisementreceived', event => {
if (event.manufacturerData.get(0x004C).byteLength === 23) {
// It’s an iBeacon...
}
});
})
Additionally, we plan to iterate on the right end-user permission experience. At this point, we are considering a permission prompt that includes the listing of the current devices that are seen by the user agent. However, more research and mocks are needed to ensure users can understand the choice they are making.
Motivation
The primary motivation is to enable new sets of use cases on the web such as indoor positioning and Physical Web-like experiences. For example, in the indoor positioning use case, a museum can deploy BLE beacons near important exhibits. When the user uses the museum's web app (and grants permission), the user can be presented with information relevant to where they are standing.
Risks
Interoperability and Compatibility
Edge: No signals
Firefox: No signals
Safari: No signals
Web / Framework developers: Positive feedback especially around early Physical Web developers and deployers.
Ergonomics
Scanned devices cannot be GATT-connected yet, but this is a planned follow on.
This API is not usable from Service Workers at this point.
Activation
This feature cannot be polyfilled.
Debuggability
No specific devtools support proposed. For testing, developers can simulate BLE advertisements by posting events to navigator.bluetooth.
Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?
Yes. Please see Implementation Status for details.
Is this feature fully tested by web-platform-tests?
No existing tests. Tests will be added as part of implementation. Our plan is to build WPT for Web Bluetooth scanning.
Link to entry on the Chrome Platform Status
https://www.chromestatus.com/features/5346724402954240
Requesting approval to ship?
No
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/0943ac6d-467b-4f4f-af9c-93e4d7110ebd%40chromium.org.