bluetoothbeaconprogressive-web-appseddystoneweb-bluetooth

Progressive web app beacon search


Is it possible to search for beacon data (uuid, url, ...) with a progressive web application using just web technologies that is without using native mobile technologies (Android, ios, ...)?

Thanks in advance.


Solution

  • Unfortunately, this is not possible as of July 2020. While Google has been working on the WebBluetooth project to bring support for many bluetooth operations to the browser, at least in Google Chrome implementations on Android 6+, Mac or ChromeOS.

    Scanning for beacons is not yet possible as of this writing. The API requires that the OS scan for devices matching a requested criteria, and then let the user choose a device to connect to using a user interface. This essentially rules out beacon detection.

    Bluetooth scanning APIs are still in draft form here.

    EDIT: The APIs mentioned by @zurfyx in the answer below allow you to scan for and connect to an advertised GATT service, but do not allow you to read the data in the advertisement. This is a critical distinction, as reading the data in the advertisement is the key capability required for actual bluetooth beacon detection. That capability is missing from that API. Without that capability, it is impossible to detect a beacon, it is only possible to connect to a BLE device that might be an Eddystone or other service advertisement-based beacon.

    UPDATE July 2020: Safari will not be getting any WebBluetooth APIs at all due to privacy concerns, according to a June 2020 announcement by Apple This makes Bluetooth scanning impossible on iOS we apps for the foreseeable future.

    As of July 2020, Chrome does not support scanning arbitrary advertisements. See status here: https://github.com/WebBluetoothCG/web-bluetooth/blob/master/implementation-status.md