B2G/Bluetooth/WebBluetooth-v2/BluetoothPairingEvent
< B2G | Bluetooth | WebBluetooth-v2
Jump to navigation
Jump to search
Overview
BluetoothPairingEvent is carried as the argument of pairing related event handlers, such as adapter.ondisplaypasskeyreq(), adapter.onenterpasskeyreq() and adapter.onpairingconfirmationreq(). Applications can get information about the address of the remote pairing device and the passkey which should be displayed on local UI.
Interface
interface BluetoothPairingEvent : Event { readonly attribute DOMString address; readonly attribute unsigned long? passkey; };
Attributes
address
- Description
- The address of remote pairing Bluetooth device.
- Value type
- DOMString
- Default value
- ""
passkey
- Description
- A passkey may be generated during the pairing process when both devices support secure simple pairing(SSP). Although BluetoothPairingEvent would be used in several event handlers, only the one fired with adapter.ondisplaypasskeyreq() will have passkey being set. For other cases, this value should be set to null.
- Value type
- unsigned long?
- Default value
- null