BluetoothPairingListener (Firefox OS)

This API is available on Firefox OS for internal applications only.

The BluetoothPairingListener interface of the Web Bluetooth API defines event handlers triggered for different pairing operations.

Interface overview

[AvailableIn=CertifiedApps, CheckPermissions="bluetooth"]
interface BluetoothPairingListener: EventTarget {
  attribute EventHandler ondisplaypasskeyreq;
  attribute EventHandler onenterpincodereq;
  attribute EventHandler onpairingconfirmationreq;
  attribute EventHandler onpairingconsentreq;
}

Event handlers

BluetoothPairingListener.ondisplaypasskeyreq
A event handler triggered when the displaypasskeyreq event is fired; this occurs when a remote bluetooth device makes a request to display the passkey on the screen during the pairing process. The event parameter is a BluetoothPairingEvent.
BluetoothPairingListener.onenterpincodereq
A event handler triggered when the enterpincodereq event is fired; this occurs when a remote bluetooth device requests the user to enter a PIN code during the pairing process. The event parameter is a BluetoothPairingEvent.
BluetoothPairingListener.onpairingconfirmationreq
A event handler triggered when the displaypasskeyreq event is fired; this occurs when a remote bluetooth device requests the user to confirm their passkey during the pairing process. Applications may prompt the user to confirm the passkey explicitly, or confirm the passkey for the user proactively. The event parameter is a BluetoothPairingEvent.
BluetoothPairingListener.onpairingconsentreq
A event handler triggered when the pairingconsentreq event is fired; this occurs when a remote bluetooth device asks the user to confirm pairing during the pairing process. Applications may prompt the user for confirmation, or confirm for the user proactively. The event parameter is a BluetoothPairingEvent.

Methods

None.

Specifications

Specification Status Comment
Web Bluetooth
The definition of 'BluetoothPairingListener' in that specification.
Draft Rough draft; not part of any official specification yet. It should be discussed as part of the W3C's System Applications Working Group.

Browser Compatibility

Supported in Firefox OS 2.1.

See also

Using the Web Bluetooth API

Document Tags and Contributors

Contributors to this page: fscholz, chrisdavidmills
Last updated by: fscholz,