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

Jump to navigation Jump to search
no edit summary
No edit summary
Line 1: Line 1:
== Overview ==
== Overview ==
'''BluetoothDeviceEvent''' is carried as the parameter of remote device found, paired, and unpaired event handlers, including [[B2G/Bluetooth/WebBluetooth-v2/BluetoothDiscoveryHandle#ondevicefound|discoveryHandle.ondevicefound]], [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#ondevicepaired|adapter.ondevicepaired]], [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#ondeviceunpaired|adapter.ondeviceunpaired]]. Applications can get the found/paired [[B2G/Bluetooth/WebBluetooth-v2/BluetoothDevice|BluetoothDevice]] object or the address of unpaired remote device.
'''BluetoothDeviceEvent''' is carried as the parameter of remote device found, paired, and unpaired event handlers, including [[B2G/Bluetooth/WebBluetooth-v2/BluetoothDiscoveryHandle#ondevicefound|discoveryHandle.ondevicefound]], [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#ondevicepaired|adapter.ondevicepaired]], [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#ondeviceunpaired|adapter.ondeviceunpaired]]. Applications can get the found/paired [[B2G/Bluetooth/WebBluetooth-v2/BluetoothDevice#BluetoothDevice|BluetoothDevice]] object or the address of unpaired remote device.


== Interface ==
== Interface ==
Line 16: Line 16:
=== device ===
=== device ===
; Description
; Description
: The found remote device ([[B2G/Bluetooth/WebBluetooth-v2/BluetoothDiscoveryHandle#ondevicefound|discoveryHandle.ondevicefound]]) or the paired remote device ([[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#ondevicepaired|adapter.ondevicepaired]]). The property is null for event handler [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#ondeviceunpaired|adapter.ondeviceunpaired]] since the event handler only requires the address of unpaired device.
: The paired remote device. The property is null for event handler [[B2G/Bluetooth/WebBluetooth-v2/BluetoothAdapter#ondeviceunpaired|adapter.ondeviceunpaired]] since the event handler only requires the address of unpaired device.


; Value type
; Value type
Confirmed users
891

edits

Navigation menu