Connect to devices via Bluetooth in a PWA
Just like a native app, a PWA can connect to nearby devices via Bluetooth with the Web Bluetooth API.
, open it from your homescreen, then tap the button below to scan nearby devices available via Bluetooth.
How it works
This simplistic demo allows you to connect to any nearby devices. In a real PWA, you'll likely want to limit the search to specific types of devices (e.g. heart rate monitors) by using filters.
You will then need to know the ID of its GATT characteristic, which can be heart rate, battery level, cycling cadence, light intensity, or just about anything else depending on the purpose of the device.