It is unclear to web developers playing with Web Bluetooth why "DOMException: Bluetooth adapter not available." is returned when calling navigator.bluetooth.requestDevice fails on Android.
Reasons are numerous:
- SDK version is too low
- Lacking Bluetooth permissions
- No Low Energy support
- Default adapter not found
It would be nice to help them understanding the root issue. I'm not sure how to provide this information so I'm just going to spread some ideas:
- Add a JS Console Info message containing the "real" reason.
- Update DOMException Error message to "Bluetooth adapter not available. See http://goo.gl/1234". Help page would contain all reasons why a bluetooth adapter would not be available.
- Return a specific DOMException Error message for most popular errors. This makes me think we might want to add some UMA to detect those.
Comment 1 by scheib@chromium.org
, Oct 17 2016