Confirmed users
891
edits
| Line 19: | Line 19: | ||
; Description | ; Description | ||
: A handler to trigger when a bluetooth adapter is plugged into the device. The event carries <tt>evt.adapter</tt> as the plugged [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter BluetoothAdapter]. | : A handler to trigger when a bluetooth adapter is plugged into the device. The event carries <tt>evt.adapter</tt> as the plugged [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter BluetoothAdapter]. Applications should call [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothManager#getDefaultAdapter.28.29 getDefaultAdapter()] in this event handler to retrieve current default adapter if no adapter was plugged in, and may call [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothManager#getAdapters.28.29 getAdapters()] for the latest array of adapters on the device. | ||
; Sample | ; Sample | ||