Please note, this is a STATIC archive of website developer.mozilla.org from November 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

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

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support No support No support No support No support No support
Feature Android Android Webview Firefox Mobile (Gecko) Firefox OS IE Mobile Opera Mobile Safari Mobile Chrome for Android
Basic support No support No support No support 2.1 No support No support No support No support

 

See also

Using the Web Bluetooth API

Document Tags and Contributors

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