B2G/Bluetooth/WebBluetooth-v2/BluetoothManager: Difference between revisions

Jump to navigation Jump to search
Line 44: Line 44:
; Parameter
; Parameter
: ''aAddressEvent''
: ''aAddressEvent''
:: The event is a [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothAddressEvent BluetoothAddressEvent] with property [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothAddressEvent#address address] as the address of removed bluetooth adapter and property [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothAddressEvent#isDefault isDefault] indicating whether the removed adapter is default adapter.
:: The event is a [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapterEvent BluetoothAdapterEvent] with property [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapterEvent#address address] as the address of removed bluetooth adapter and property [https://wiki.mozilla.org/B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapterEvent#isDefault isDefault] indicating whether the removed adapter is default adapter.


; Sample
; Sample
  function bt_onAdapterAdded(evt) {
  function bt_onAdapterRemoved(evt) {
   var address = evt.address;
   var address = evt.address;
   var isDefaultAdapter = evt.isDefault;
   var isDefaultAdapter = evt.isDefault;
Confirmed users
891

edits

Navigation menu