I'm working on a project that should display the contents of advertisements using web-bluetooth without pairing. Using navigator.bluetooth.requestLEScan() also lists several devices with the upcoming bluetooth permission request on android. Here the first question is: Why are no devices shown that only use extended advertising (or which are not connectable?)?
In the code using
const scan = await navigator.bluetooth.requestLEScan({
acceptAllAdvertisements: true,
options: { keepRepeatedDevices: true }
});
scan.onadvertisementreceived = event => {...};
unfortunately doesn't bring up any event then. Another app on this phone shows many advertisements of devices, including the extended ones. What am I doing wrong that no single event shows up? Is the Web Bluetooth API fine for getting extended advertisement content?