W3C home > Mailing lists > Public > public-web-bluetooth-log@w3.org > June 2015

Re: [web-bluetooth] Say what to do when the system has no Bluetooth adapter or it's off.

From: Vincent Scheib via GitHub <sysbot+gh@w3.org>
Date: Tue, 02 Jun 2015 20:29:38 +0000
To: public-web-bluetooth-log@w3.org
Message-ID: <issue_comment.created-108089509-1433276977-sysbot+gh@w3.org>
The existence of the adapter and its powered state shouldn't be 
exposed until after device access is permitted by a user selecting a 
device. At that point I think `NetworkError` may make sense, but a 
more specific error type that indicates the adapter power is off would
 be cleaner for application developers to respond to. Apps would 
reasonably display UI to the effect of "To enable this, please turn on
 Bluetooth". 

navigator.bluetooth.enabled would be reasonable to query, except for 
the privacy concern. I suppose it could return `undefined` until the 
first device selected.

-- 
GitHub Notif of comment by scheib
See 
https://github.com/WebBluetoothCG/web-bluetooth/issues/127#issuecomment-108089509
Received on Tuesday, 2 June 2015 20:29:39 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 2 June 2015 20:29:40 UTC